Forums › ProRealTime English forum › ProBuilder support › PRC williams' high and low indicator › Reply To: PRC williams' high and low indicator
05/21/2018 at 12:31 PM
#71002
The code should be extremely easy to convert to a HISTOGRAM, when it draws an Arrow + Ellipse I can se a value to be returned by the indicator, 1 for Bullish candles and -1 for Bearish candles and I attach te code for those who want to investigate more, but as from attached pic, histogram bars are NOT displayed when ane arrow+ellispe is on the price!
And I cannot guess why.
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 44 45 46 47 48 49 50 51 52 53 54 55 56 |
DEFPARAM CalculateOnLastBars = 300 x = 0 //computation of the radius to draw ellipses radius=average[200](range)/4 //if golong=1 then //golong=0 //endif //formula to compute short term swing points if (high>alto[1]) and not (high<high[1] and low>low[1]) then alto=high basso=low markup=barindex markhigh=high endif if (low<basso[1]) and not (high<high[1] and low>low[1]) then alto=high basso=low markdown=barindex marklow=low endif if alto<alto[1] and trend=1 then trend=0 drawarrowdown(markup,markhigh) mediummarkup=shortmarkup shortmarkup=markup longmarkhigh=mediummarkhigh mediummarkhigh=shortmarkhigh shortmarkhigh=markhigh //intermediate high swing points if longmarkhigh<mediummarkhigh and mediummarkhigh>shortmarkhigh then DRAWELLIPSE(mediummarkup-1, mediummarkhigh-radius, mediummarkup+1, mediummarkhigh+radius) //drawarrowdown(markup,markhigh) x = -1 endif endif if basso>basso[1] and trend=0 then trend=1 drawarrowup(markdown,marklow) mediummarkdown=shortmarkdown shortmarkdown=markdown longmarklow=mediummarklow mediummarklow=shortmarklow shortmarklow=marklow //intermediate low swing points if longmarklow>mediummarklow and mediummarklow<shortmarklow then DRAWELLIPSE(mediummarkdown-1, mediummarklow-radius, mediummarkdown+1, mediummarklow+radius) //drawarrowup(markdown,marklow) x = 1 endif endif //drawcandle(open,high,low,close) return x, 0 |