Higher Lows Price and MACD in sync when candle crosses MA
Forums › ProRealTime English forum › ProBuilder support › Higher Lows Price and MACD in sync when candle crosses MA
- This topic has 5 replies, 3 voices, and was last updated 5 years ago by Malend.
Viewing 6 posts - 1 through 6 (of 6 total)
-
-
09/10/2019 at 11:10 AM #107045
With help from Vonasi (many many thanks) I developed an indicator which shows higher lows and lower highs in the MACD in sync with higher lows from bars which cross the Averge line. You are able set your personal Average and personal MACD.
In the image you see an example of lower highs in sync.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162DEFPARAM calculateonlastbars = 1000macdl = macdline[ShortTermMA,LongTermMA,Periods]macds = exponentialaverage[Periods](macdl)//start of cycle lowIf macdl =< macds and macdl[1] > macds[1] thenmacdlowest2 = macdlowestlowestprice2 = lowestpriceincyclelow = 1macdlowest = macdlLowestPrice = lowendif//End of cycle lowIf macdl > macds and macdl[1] < macds[1] or macdl < macdlowest2 thenincyclelow = 0endif//lowest macd and price in cycleif incyclelow thenmacdlowest = min(macdlowest, macdl)lowestPrice = min(lowestprice, low)c1 = open < average[ma]c2 = close > average[ma]c3 = macdlowest > macdlowest2c4 = lowestprice > lowestprice2if c1 and c2 and c3 and c4 thendrawvline(barindex)coloured(0,250,0)endifendif//start of cycle highIf macdl => macds and macdl[1] < macds[1] thenmacdhighest2 = macdhighesthighestprice2 = highestpriceincyclehigh = 1macdhighest = macdlhighestPrice = highendif//End of cycle highIf macdl < macds and macdl[1] > macds[1] or macdl > macdhighest2 thenincyclehigh = 0endif//highest macd and price in cycle highif incyclehigh thenmacdhighest = min(macdhighest, macdl)highestPrice = min(highestprice, low)c1a = open > average[ma]c2a = close < average[ma]c3a = macdhighest < macdhighest2c4a = highestprice < highestprice2if c1a and c2a and c3a and c4a thendrawvline(barindex)coloured(250,0,0)endifendifreturn09/10/2019 at 1:17 PM #10705509/10/2019 at 1:19 PM #107056I found one error, so here the fresh one.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061DEFPARAM calculateonlastbars = 1000macdl = macdline[ShortTermMA,LongTermMA,Periods]macds = exponentialaverage[Periods](macdl)//start of cycle lowIf macdl =< macds and macdl[1] > macds[1] thenmacdlowest2 = macdlowestlowestprice2 = lowestpriceincyclelow = 1macdlowest = macdlLowestPrice = lowendif//End of cycle lowIf macdl > macds and macdl[1] < macds[1] or macdl < macdlowest2 thenincyclelow = 0endif//lowest macd and price in cycleif incyclelow thenmacdlowest = min(macdlowest, macdl)lowestPrice = min(lowestprice, low)c1 = open < average[ma]c2 = close > average[ma]c3 = macdlowest > macdlowest2c4 = lowestprice > lowestprice2if c1 and c2 and c3 and c4 thendrawvline(barindex)coloured(0,250,0)endifendif//start of cycle highIf macdl => macds and macdl[1] < macds[1] thenmacdhighest2 = macdhighesthighestprice2 = highestpriceincyclehigh = 1macdhighest = macdlhighestPrice = highendif//End of cycle highIf macdl < macds and macdl[1] > macds[1] or macdl > macdhighest2 thenincyclehigh = 0endif//highest macd and price in cycle highif incyclehigh thenmacdhighest = max(macdhighest, macdl)highestPrice = max(highestprice, high)c1a = open > average[ma]c2a = close < average[ma]c3a = macdhighest < macdhighest2c4a = highestprice < highestprice2if c1a and c2a and c3a and c4a thendrawvline(barindex)coloured(250,0,0)endifendif09/10/2019 at 1:42 PM #10705809/10/2019 at 1:56 PM #107061Hi Nicolas,
It could be a way enter positions. Of course it is an indicator which only indicates, but it in a trending market it could be a way to enter positions. As you see in example in the image it indicates a possibility to go long.
09/10/2019 at 1:58 PM #107062 -
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)
Find exclusive trading pro-tools on
Similar topics: