Forums › ProRealTime English forum › ProBuilder support › Cross Over Indicator HELP please › Reply To: Cross Over Indicator HELP please
12/29/2017 at 6:13 PM
#56829
I modified the above code so that it does not display dots and does not display lines if more than one arrow occurs before 5 candles have elapsed (no matter what direction they are):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
DEFPARAM CalculateOnLastBars = 1000 fast = ExponentialAverage[9](close) slow = ExponentialAverage[40](close) //first arrow is blueish CrossOver = fast crosses over slow IF CrossOver THEN CrossUnder = 0 //cross = slow[1] DRAWARROWUP(barindex,LOW-5*pointsize) COLOURED(0,255,10) endif IF CrossOver[5] THEN IF summation[4](CrossOver OR CrossUnder) = 0 THEN TopLine = highest[5](high) + (5 * pipsize) DRAWTEXT("---#TopLine#---",barindex-3,TopLine,SansSerif,Bold,16)coloured(153,0,0) ENDIF ENDIF //next arrows are purple and semi transparent //if fast>slow AND slow<>cross then //DRAWTEXT("*",barindex, slow) COLOURED(0,204,0) //endif //first arrow is blueish CrossUnder = fast crosses under slow if CrossUnder then CrossOver = 0 //cross = slow[1] DRAWARROWDOWN(barindex,HIGH+5*pointsize) COLOURED(255,0,10) endif IF CrossUnder[5] THEN IF summation[4](CrossOver OR CrossUnder) = 0 THEN BottomLine = lowest[5](low) - (5 * pipsize) DRAWTEXT("---#BottomLine#---",barindex-3,BottomLine,SansSerif,Bold,16)coloured(153,0,0) ENDIF ENDIF //next arrows are purple and semi transparent //if fast<slow AND slow<>cross then //DRAWTEXT("*",barindex, slow) COLOURED(255,0,0) //endif RETURN |
Roberto