PRC williams' high and low indicator
Forums › ProRealTime English forum › ProBuilder support › PRC williams' high and low indicator
- This topic has 24 replies, 4 voices, and was last updated 6 years ago by Ste.
-
-
05/22/2018 at 12:50 AM #71040
I don’t think so, since it quite the same as an indicator, but I’ll have a try.
05/22/2018 at 7:03 AM #71044histogram bars are NOT displayed when ane arrow+ellispe is on the price! And I cannot guess why.
Because you are resetting X to zero at line 2 of the indicator’s code.
05/22/2018 at 8:34 AM #71069Sorry Nicolas, but it doesn’t work either.
This is the original code I modified to display ONLY arrows that are circled. I only moved the DRAWARROWUP/DRAWARROWDOWN lines to the line following DRAWELLIPSE (and commented out this one), I also commented out the DRAWCANDLE line at the bottom, plus I had to comment out some variables used to drawellipses. This code is working as you can see from indicator box 3, since it displays ONLY those arrows that are circled on the price chart.
But, if instead of drawing an arrov a simply set x=1 when it’s an upward arrow and x=-1 when it’s the other way round, it does not work! With initial x=0 the result is box 1, without x=0 (or setting just ONCE x=0) the result is the histogram in box 2. In either cases it’s wrong.
I am wondering why replacing a DRAWARROWUP with x=1 produces odd results.
I also tried to set DEFPARAM CalculateOnLastBars = 1000 (from 300), but that’s not the problem I guess, since the original version on the price chart still has 300 as a bar limit.
William's high and low1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253DEFPARAM CalculateOnLastBars = 1000//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 pointsif (high>alto[1]) and not (high<high[1] and low>low[1]) thenalto=highbasso=lowmarkup=barindexmarkhigh=highendifif (low<basso[1]) and not (high<high[1] and low>low[1]) thenalto=highbasso=lowmarkdown=barindexmarklow=lowendifif alto<alto[1] and trend=1 thentrend=0//drawarrowdown(markup,markhigh)mediummarkup=shortmarkupshortmarkup=markuplongmarkhigh=mediummarkhighmediummarkhigh=shortmarkhighshortmarkhigh=markhigh//intermediate high swing pointsif longmarkhigh<mediummarkhigh and mediummarkhigh>shortmarkhigh then//DRAWELLIPSE(mediummarkup-1, mediummarkhigh-radius, mediummarkup+1, mediummarkhigh+radius)drawarrowdown(mediummarkup,markhigh)endifendifif basso>basso[1] and trend=0 thentrend=1//drawarrowup(markdown,marklow)mediummarkdown=shortmarkdownshortmarkdown=markdownlongmarklow=mediummarklowmediummarklow=shortmarklowshortmarklow=marklow//intermediate low swing pointsif longmarklow>mediummarklow and mediummarklow<shortmarklow then//DRAWELLIPSE(mediummarkdown-1, mediummarklow-radius, mediummarkdown+1, mediummarklow+radius)drawarrowup(mediummarkdown,marklow)endifendif//drawcandle(open,high,low,close)return05/22/2018 at 8:42 AM #71071Because arrows are plotted in the past? While histogram are plotted starting from the current bar.. I don’t understand your issue because you stated this behavior in one of your previous post of the thread?
1 user thanked author for this post.
05/22/2018 at 9:22 AM #7107805/23/2018 at 9:50 PM #7121605/23/2018 at 9:55 PM #71217It is not possible to use it as an histogram or as a screener.
It can only be used as an indicator displaying an arrow.
05/23/2018 at 9:59 PM #7121805/24/2018 at 8:25 AM #71230It can be used in a strategy (as it can display histograms and scan markets) but keeping in mind that arrows are displayed in the past, so when you get a signal from the code the actual candle is “old”, but I don’t know Nicolas’code and Martingale strategies as well.
Sorry, I can’t be of help about this.
05/24/2018 at 8:38 AM #71232 -
AuthorPosts
Find exclusive trading pro-tools on