Neely Elliott Wave indicator
Forums › ProRealTime English forum › ProBuilder support › Neely Elliott Wave indicator
- This topic has 4 replies, 3 voices, and was last updated 6 years ago by Lighthouse.
-
-
11/18/2018 at 1:44 PM #85139
Neely method is based on the concept monowaves which is a simple movement until the price change of direction. Monowaves can be identified by constructing price maxima and minima for a selected period in the order of occurrence of the beginning and the center slot.
Forex indicator NeelyElliotWave builds on the chart four monowaves according to different time periods:
Monthly (by default – a blue-violet color).
Weekly (default – green).
Day (default – blue).
6-hour (default – yellow).
The beginning and end of each monowaves marked point.11/18/2018 at 1:46 PM #85142I can’t find a way to edit the first post and its title.
Of course it is a request to convert from mq4 to PRT
mq4 code123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576//+------------------------------------------------------------------+//| FX5_NellyElliotWave.mq4 |//| FX5, Copyright © 2007 |//| hazem@uk2.net |//+------------------------------------------------------------------+#property copyright "FX5, Copyright © 2007"#property link "hazem@uk2.net"#property indicator_chart_window#property indicator_buffers 8#define Sunday 0#define Monday 1//---- input parametersextern string segment_0="*** Daily Close Settings ***";extern bool enableCustomDailyClose=false;extern string dailyCloseTime="00:00";extern string segment_1="*** Waves Display Setting ***";extern bool showMonthlyWaves= true;extern bool showWeeklyWaves = true;extern bool showDailyWaves=true;extern bool showQuarterDailyWaves=true;extern string segment_2="*** Waves Color Settings ***";extern color monthlyWavesColor= clrBlueViolet;extern color weeklyWavesColor = clrGreen;extern color dailyWavesColor=clrBlue;extern color quarterDailyWavesColor=clrYellow;extern string segment_3="*** SwingPoints Color Settings ***";extern color monthlySwingColor= clrYellow;extern color weeklySwingColor = clrFireBrick;extern color dailySwingColor=clrRed;extern color quarterDailySwingColor=clrChocolate;//---- buffersdouble monthlyWaves[];double monthlySwings[];double weeklyWaves[];double weeklySwings[];double dailyWaves[];double dailySwings[];double quarterDailyWaves[];double quarterDailySwings[];//+------------------------------------------------------------------+//| Custom indicator initialization function |//+------------------------------------------------------------------+int init(){datetime time=StrToTime(dailyCloseTime);dailyCloseTime=TimeToStr(time,TIME_MINUTES);//---- indicatorsint timeFrame=Period();int monthlyWidth= 2;int weeklyWidth = 2;int dailyWidth=2;int quarterDailyWidth=1;if(timeFrame>=PERIOD_D1)weeklyWidth= 1;if(timeFrame >= PERIOD_H4)dailyWidth = 1;SetIndexStyle(0,DRAW_SECTION,STYLE_SOLID,monthlyWidth,monthlyWavesColor);SetIndexStyle(2,DRAW_SECTION,STYLE_SOLID,weeklyWidth,weeklyWavesColor);SetIndexStyle(4,DRAW_SECTION,STYLE_SOLID,dailyWidth,dailyWavesColor);SetIndexStyle(6,DRAW_SECTION,STYLE_SOLID,quarterDailyWidth,quarterDailyWavesColor);SetIndexStyle(1,DRAW_ARROW,EMPTY,monthlyWidth,monthlySwingColor);SetIndexStyle(3,DRAW_ARROW,EMPTY,weeklyWidth,weeklySwingColor);SetIndexStyle(5,DRAW_ARROW,EMPTY,dailyWidth,dailySwingColor);SetIndexStyle(7,DRAW_ARROW,EMPTY,quarterDailyWidth,quarterDailySwingColor);SetIndexArrow(1,159);SetIndexArrow(3,159);SetIndexArrow(5,159);SetIndexArrow(7,159);SetIndexBuffer(0,monthlyWaves);SetIndexBuffer(1,monthlySwings);SetIndexBuffer(2,weeklyWaves);SetIndexBuffer(3,weeklySwings);SetIndexBuffer(4,dailyWaves);SetIndexBuffer(5,dailySwings);SetIndexBuffer(6,quarterDailyWaves);SetIndexBuffer(7,quarterDailySwings);SetIndexEmptyValue(0,0);SetIndexEmptyValue(1,0);SetIndexEmptyValue(2,0);SetIndexEmptyValue(3,0);SetIndexEmptyValue(4,0);SetIndexEmptyValue(5,0);SetIndexEmptyValue(6,0);SetIndexEmptyValue(7,0);IndicatorDigits(Digits);//----return(0);}//+------------------------------------------------------------------+//| Custom indicator deinitialization function |//+------------------------------------------------------------------+int deinit(){Comment("");return(0);}//+------------------------------------------------------------------+//| Custom indicator iteration function |//+------------------------------------------------------------------+int start(){Comment("Designed & Prgramed By: FX5\n","***hazem@uk2.net***");int countedBars=IndicatorCounted();if(countedBars<0)countedBars=0;int timeFrame=Period();if(showMonthlyWaves){if(timeFrame==PERIOD_D1 || timeFrame==PERIOD_H4)IdentifyMonthlyWaves(countedBars);}if(showWeeklyWaves){if(timeFrame==PERIOD_D1 || timeFrame==PERIOD_H4 ||timeFrame==PERIOD_H1)IdentifyWeeklyWaves(countedBars);}if(showDailyWaves){if(timeFrame==PERIOD_H4 || timeFrame==PERIOD_H1 ||timeFrame == PERIOD_M30 ||timeFrame == PERIOD_M15 ||timeFrame == PERIOD_M5 || timeFrame == PERIOD_M1)IdentifyDailyWaves(countedBars);}if(showQuarterDailyWaves){if(timeFrame==PERIOD_H1 || timeFrame==PERIOD_M30 ||timeFrame == PERIOD_M15 || timeFrame == PERIOD_M5 ||timeFrame == PERIOD_M1)IdentifyQuarterDailyWaves(countedBars);}return(0);}//+------------------------------------------------------------------+void IdentifyMonthlyWaves(int countedBars){int lastShift=-1;int limit=Bars-countedBars;if(countedBars==0) limit--;for(int i=limit; i>=0; i--){int lastClose=GetLastMonthlyClose(i);if(lastShift==lastClose)continue;elselastShift=lastClose;int lastOpen=GetLastMonthlyClose(lastClose);if(lastClose==-1 || lastOpen==-1)continue;int highShift= GetHighestHighShift(lastClose+1,lastOpen-lastClose);int lowShift = GetLowestLowShift(lastClose+1,lastOpen-lastClose);double highPrice= High[highShift];double lowPrice = Low[lowShift];if(highShift>lowShift){monthlyWaves[lastOpen]=highPrice;int middleShift=lastClose+MathCeil((lastOpen-lastClose+1)/2);monthlyWaves[middleShift]=lowPrice;}else{monthlyWaves[lastOpen]=lowPrice;middleShift=lastClose+MathCeil((lastOpen-lastClose+1)/2);monthlyWaves[middleShift]=highPrice;}int swing_0 = GetLastMonthlySwing(i);int swing_1 = GetLastMonthlySwing(swing_0);int swing_2 = GetLastMonthlySwing(swing_1);int swing_3 = GetLastMonthlySwing(swing_2);if(swing_0>=0 && swing_1>=0 && swing_2>=0 && swing_3>=0){if(monthlyWaves[swing_1]>monthlyWaves[swing_0] && monthlyWaves[swing_1]>monthlyWaves[swing_2])monthlySwings[swing_1]=monthlyWaves[swing_1];if(monthlyWaves[swing_1]<monthlyWaves[swing_0] && monthlyWaves[swing_1]<monthlyWaves[swing_2])monthlySwings[swing_1]=monthlyWaves[swing_1];if(monthlyWaves[swing_2]>monthlyWaves[swing_1] && monthlyWaves[swing_2]>monthlyWaves[swing_3])monthlySwings[swing_2]=monthlyWaves[swing_2];if(monthlyWaves[swing_2]<monthlyWaves[swing_1] && monthlyWaves[swing_2]<monthlyWaves[swing_3])monthlySwings[swing_2]=monthlyWaves[swing_2];}}}//+------------------------------------------------------------------+void IdentifyWeeklyWaves(int countedBars){int lastShift=-1;int limit=Bars-countedBars;if(countedBars==0) limit--;for(int i=limit; i>=0; i--){int lastWeekClose=GetLastWeeklyClose(i);if(lastShift==lastWeekClose)continue;elselastShift=lastWeekClose;int lastWeekOpen=GetLastWeeklyClose(lastWeekClose);if(lastWeekClose==-1 || lastWeekOpen==-1)continue;int weekHighShift= GetHighestHighShift(lastWeekClose+1,lastWeekOpen-lastWeekClose);int weekLowShift = GetLowestLowShift(lastWeekClose+1,lastWeekOpen-lastWeekClose);double weekHighPrice= High[weekHighShift];double weekLowPrice = Low[weekLowShift];if(weekHighShift>weekLowShift){weeklyWaves[lastWeekOpen]=weekHighPrice;int middleWeekShift=lastWeekClose+MathCeil((lastWeekOpen-lastWeekClose+1)/2);weeklyWaves[middleWeekShift]=weekLowPrice;}else{weeklyWaves[lastWeekOpen]=weekLowPrice;middleWeekShift=lastWeekClose+MathCeil((lastWeekOpen-lastWeekClose+1)/2);weeklyWaves[middleWeekShift]=weekHighPrice;}int swing_0 = GetLastWeeklySwing(i);int swing_1 = GetLastWeeklySwing(swing_0);int swing_2 = GetLastWeeklySwing(swing_1);int swing_3 = GetLastWeeklySwing(swing_2);if(swing_0>=0 && swing_1>=0 && swing_2>=0 && swing_3>=0){if(weeklyWaves[swing_1]>weeklyWaves[swing_0] && weeklyWaves[swing_1]>weeklyWaves[swing_2])weeklySwings[swing_1]=weeklyWaves[swing_1];if((swing_2>=0) && weeklyWaves[swing_1]<weeklyWaves[swing_0] && weeklyWaves[swing_1]<weeklyWaves[swing_2])weeklySwings[swing_1]=weeklyWaves[swing_1];if(weeklyWaves[swing_2]>weeklyWaves[swing_1] && weeklyWaves[swing_2]>weeklyWaves[swing_3])weeklySwings[swing_2]=weeklyWaves[swing_2];if(weeklyWaves[swing_2]<weeklyWaves[swing_1] && weeklyWaves[swing_2]<weeklyWaves[swing_3])weeklySwings[swing_2]=weeklyWaves[swing_2];}}}//+------------------------------------------------------------------+void IdentifyDailyWaves(int countedBars){int lastShift=-1;int limit=Bars-countedBars;if(countedBars==0) limit--;for(int i=limit; i>=0; i--){int lastDayClose=GetLastDailyClose(i);if(lastShift==lastDayClose)continue;elselastShift=lastDayClose;int lastDayOpen=GetLastDailyClose(lastDayClose);if(lastDayClose==-1 || lastDayOpen==-1)continue;int dayHighShift= GetHighestHighShift(lastDayClose+1,lastDayOpen-lastDayClose);int dayLowShift = GetLowestLowShift(lastDayClose+1,lastDayOpen-lastDayClose);double dayHighPrice= High[dayHighShift];double dayLowPrice = Low[dayLowShift];//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+if(dayHighShift>dayLowShift){dailyWaves[lastDayOpen]=dayHighPrice;int middleDayShift=lastDayClose+MathCeil((lastDayOpen-lastDayClose+1)/2);dailyWaves[middleDayShift]=dayLowPrice;}//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+else{dailyWaves[lastDayOpen]=dayLowPrice;middleDayShift=lastDayClose+MathCeil((lastDayOpen-lastDayClose+1)/2);dailyWaves[middleDayShift]=dayHighPrice;}int swing_0 = GetLastDailySwing(i);int swing_1 = GetLastDailySwing(swing_0);int swing_2 = GetLastDailySwing(swing_1);int swing_3 = GetLastDailySwing(swing_2);if(swing_0>=0 && swing_1>=0 && swing_2>=0 && swing_3>=0){if(dailyWaves[swing_1]>dailyWaves[swing_0] && dailyWaves[swing_1]>dailyWaves[swing_2])dailySwings[swing_1]=dailyWaves[swing_1];if(dailyWaves[swing_1]<dailyWaves[swing_0] && dailyWaves[swing_1]<dailyWaves[swing_2])dailySwings[swing_1]=dailyWaves[swing_1];if(dailyWaves[swing_2]>dailyWaves[swing_1] && dailyWaves[swing_2]>dailyWaves[swing_3])dailySwings[swing_2]=dailyWaves[swing_2];if(dailyWaves[swing_2]<dailyWaves[swing_1] && dailyWaves[swing_2]<dailyWaves[swing_3])dailySwings[swing_2]=dailyWaves[swing_2];}}}//+------------------------------------------------------------------+void IdentifyQuarterDailyWaves(int countedBars){int lastShift=-1;int limit=Bars-countedBars;if(countedBars==0) limit--;for(int i=limit; i>=0; i--){int lastClose=GetLastQuarterDailyClose(i);if(lastShift==lastClose)continue;elselastShift=lastClose;int lastOpen=GetLastQuarterDailyClose(lastClose);if(lastClose==-1 || lastOpen==-1)continue;int highShift= GetHighestHighShift(lastClose+1,lastOpen-lastClose);int lowShift = GetLowestLowShift(lastClose+1,lastOpen-lastClose);double highPrice= High[highShift];double lowPrice = Low[lowShift];//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+if(highShift>lowShift){quarterDailyWaves[lastOpen]=highPrice;int middleShift=lastClose+MathCeil((lastOpen-lastClose+1)/2);quarterDailyWaves[middleShift]=lowPrice;}//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+else{quarterDailyWaves[lastOpen]=lowPrice;middleShift=lastClose+MathCeil((lastOpen-lastClose+1)/2);quarterDailyWaves[middleShift]=highPrice;}int swing_0 = GetLastQuarterDailySwing(i);int swing_1 = GetLastQuarterDailySwing(swing_0);int swing_2 = GetLastQuarterDailySwing(swing_1);int swing_3 = GetLastQuarterDailySwing(swing_2);if(swing_0>=0 && swing_1>=0 && swing_2>=0 && swing_3>=0){if(quarterDailyWaves[swing_1]>quarterDailyWaves[swing_0] && quarterDailyWaves[swing_1]>quarterDailyWaves[swing_2])quarterDailySwings[swing_1]=quarterDailyWaves[swing_1];if(quarterDailyWaves[swing_1]<quarterDailyWaves[swing_0] && quarterDailyWaves[swing_1]<quarterDailyWaves[swing_2])quarterDailySwings[swing_1]=quarterDailyWaves[swing_1];if(quarterDailyWaves[swing_2]>quarterDailyWaves[swing_1] && quarterDailyWaves[swing_2]>quarterDailyWaves[swing_3])quarterDailySwings[swing_2]=quarterDailyWaves[swing_2];if(quarterDailyWaves[swing_2]<quarterDailyWaves[swing_1] && quarterDailyWaves[swing_2]<quarterDailyWaves[swing_3])quarterDailySwings[swing_2]=quarterDailyWaves[swing_2];}}}//+------------------------------------------------------------------+int GetLastMonthlySwing(int shift){for(int i=shift+1;(i<Bars-1); i++){if(monthlyWaves[i]!=0)return(i);}return(-1);}//+------------------------------------------------------------------+int GetLastWeeklySwing(int shift){for(int i=shift+1;(i<Bars-1); i++){if(weeklyWaves[i]!=0)return(i);}return(-1);}//+------------------------------------------------------------------+int GetLastDailySwing(int shift){for(int i=shift+1;(i<Bars-1); i++){if(dailyWaves[i]!=0)return(i);}return(-1);}//+------------------------------------------------------------------+int GetLastQuarterDailySwing(int shift){for(int i=shift+1;(i<Bars-1); i++){if(quarterDailyWaves[i]!=0)return(i);}return(-1);}//+------------------------------------------------------------------+int GetLastMonthlyClose(int shift){for(int i=shift+1;(i<Bars-1); i++){if(TimeDay(Time[i])<TimeDay(Time[i+1]))return(i);}return(-1);}//+------------------------------------------------------------------+int GetLastWeeklyClose(int shift){for(int i=shift+1;(i<Bars-1); i++){if(TimeDayOfWeek(Time[i])<TimeDayOfWeek(Time[i+1]))return(i);}return(-1);}//+------------------------------------------------------------------+int GetLastDailyClose(int shift){if(enableCustomDailyClose){for(int i=shift+1;(i<Bars-1); i++)//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+{string candleDateString=TimeToStr(Time[i],TIME_DATE);datetime closeTime=StrToTime(candleDateString+" "+dailyCloseTime);if(closeTime<Time[shift] && closeTime>=Time[i])return(i);}}else{for(i=shift+1;(i<Bars-1); i++)//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+{if(TimeDayOfWeek(Time[i])!=TimeDayOfWeek(Time[i+1]) &&TimeDayOfWeek(Time[i])!=Monday && TimeDayOfWeek(Time[i+1])!=Sunday)return(i);}}return(-1);}//+------------------------------------------------------------------+int GetLastQuarterDailyClose(int shift){if(enableCustomDailyClose){int colonIndex= StringFind(dailyCloseTime,":",0);if(colonIndex == -1)return(-1);string closeHourString=StringSubstr(dailyCloseTime,0,colonIndex);int closeHour=StrToInteger(closeHourString);}elsecloseHour=0;for(int i=shift+1; i<Bars; i++){string candleDateString=TimeToStr(Time[i],TIME_DATE);int quarterHour=HourSum(closeHour,0);datetime closeTime=StrToTime(candleDateString+" "+DoubleToStr(quarterHour,0)+":00");if(closeTime<Time[shift] && closeTime>=Time[i])return(i);quarterHour=HourSum(closeHour,6);closeTime=StrToTime(candleDateString+" "+DoubleToStr(quarterHour,0)+":00");if(closeTime<Time[shift] && closeTime>=Time[i])return(i);quarterHour=HourSum(closeHour,12);closeTime=StrToTime(candleDateString+" "+DoubleToStr(quarterHour,0)+":00");if(closeTime<Time[shift] && closeTime>=Time[i])return(i);quarterHour=HourSum(closeHour,18);closeTime=StrToTime(candleDateString+" "+DoubleToStr(quarterHour,0)+":00");if(closeTime<Time[shift] && closeTime>=Time[i])return(i);}return(-1);}//+------------------------------------------------------------------+int HourSum(int firstHour,int secondHour){int sum = firstHour + secondHour;if(sum >= 24)sum -= 24;return(sum);}//+------------------------------------------------------------------+int GetHighestHighShift(int start,int count){int highestShift=-1;double highestPrice=-1;for(int i=start; i<start+count; i++)//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+{if(High[i]>highestPrice){highestShift = i;highestPrice = High[i];}}return(highestShift);}//+------------------------------------------------------------------+int GetLowestLowShift(int start,int count){int lowestShift=-1;double lowestPrice=9999999;for(int i=start; i<start+count; i++)//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+{if(Low[i]<lowestPrice){lowestShift = i;lowestPrice = Low[i];}}return(lowestShift);}//+------------------------------------------------------------------+//+------------------------------------------------------------------+11/18/2018 at 2:58 PM #85147You only have the option to edit your posts for five minutes after they have been posted. After that time there is no option to edit.
Reminder to all forum members – all requests for code conversion should be done using the following page:
https://www.prorealcode.com/free-code-conversion/
11/20/2018 at 9:18 AM #8526911/20/2018 at 9:52 PM #85356Sorry, but this code have too many data arrays and functions that are impossible to be coded with ProBuilder.
But I heard (to be confirmed) that an Elliot Wave indicator could be added by PRT into the version 11.
OK then, Thanks anyway 😉
-
AuthorPosts
Find exclusive trading pro-tools on