Monthly High Low Close Indicator
Forums › ProRealTime English forum › ProBuilder support › Monthly High Low Close Indicator
- This topic has 49 replies, 13 voices, and was last updated 3 years ago by MacroT.
-
-
09/22/2017 at 10:09 AM #46897Swingforfortune wrote:
Strange, this code works as an indicator but not as a screener??Yes that’s what I also found.
Ahh, great, thank you for you work Nicolas!12/08/2017 at 9:55 PM #55202Bonjour ,
J’ai essayer ton code “plus haut et plus bas trimestriel” en M15 sa me mais un ligne tout en bas du graphique ??
Aurait tu une idée ??
Plus Haut & Plus bas Trimestrial123456789101112trimH=max(trimH,high)trimL=min(trimL,low)If openMonth<>openMonth[1] thenif openmonth=4 or openmonth=7 or openmonth=10 or openmonth=1 thentrimestrialH=trimHtrimestrialL=trimLtrimL=close*100trimH=0endifEndifreturn trimestrialH,trimestrialLAmicalement John
01/18/2018 at 10:16 PM #59838Sorry, wrong code, this one should work better:
123456789101112trimH=max(trimH,high)trimL=min(trimL,low)If openMonth<>openMonth[1] thenif openmonth=4 or openmonth=7 or openmonth=10 or openmonth=1 thentrimestrialH=trimHtrimestrialL=trimLtrimL=close*100trimH=0endifEndifreturn trimestrialH,trimestrialLHello,
Thanks a lot for your help.
Your code works fine for quarter on daily graph, but not on lower timeframe, where value for quarter low is equal to 0.
Any idea to fix that bug ?
Thanks
01/18/2018 at 10:26 PM #59842That’s not a bug. 200 1hour units is not sufficient to get enough bars for a quarter. Expand the displayed units.
2 users thanked author for this post.
01/19/2018 at 7:24 PM #59916Thanks a lot for your help.
01/19/2018 at 8:10 PM #59918I can not do anything with OpenMonth, I fixed the screener to return information with “Month” instead, but the values of the quarters may not be the right ones, to be checked:
1234567891011121314151617181920212223242526272829303132333435363738// previous quartly high/lowtrimH = max(trimH,high)trimL = min(trimL,low)if month <> month[1] thenMhi=trimHMlo=trimLif month = 4 or month = 7 or month = 10 or month = 1 thenQhi = trimHQlo = trimLtrimL = close*100trimH = 0endifendifif close > Qhi thenq = 20endifif close < Qlo thenq = 10endifif close < Qhi and close > Qlo thenq = 0endif//m=0if close > Mhi thenm = 2endifif close < Mlo thenm = 1endifif close < Mhi and close > Mlo thenm = 0endift = q + mSCREENER (t as “Q M”)Hello Nicolas,
I really thank you for the help you provide to all of us.
When you correct that screener, you wrote :
Mhi = trimHMlo = trimLI understand that means that the value returned for monthly will be the trimestrial one.Is that right ?Thanks01/21/2018 at 11:15 AM #60066I understand that means that the value returned for monthly will be the trimestrial one. Is that right ?
Don’t remember exactly how I coded it, but seems right to me after a quick read of the code.
01/21/2018 at 7:04 PM #60086H i Nicolas,
I don’t understand your answer. Do you want to say it’s right for you that mensual and trimertrial values are the same or it’s right for you that the screener return 2 different value ?
thanks for your help
04/04/2019 at 7:35 PM #95493The code is not correct in a weekly chart – see attachment. It is always the problem with the first candle. How can this be fixed?
Will there be soon a variable for week and month high/low? I think this would help a lot!!!!
12345678910trimH=max(trimH,high)trimL=min(trimL,low)If openMonth <> openMonth[1] thenif openmonth=4 or openmonth=7 or openmonth=10 or openmonth=1 thentrimestrialH=trimHtrimestrialL=trimLtrimL=close*100trimH=0endifEndif04/05/2019 at 8:50 AM #9550104/05/2019 at 9:20 AM #9550304/05/2019 at 10:19 AM #95515There is a SERIOUS problem in ProRealtime with previous OHLC values. Everthing works fine with “Dlow” and “Dhigh”, but every other OHLC (Hour, Week, Month etc.) doesn’t work correct in the several timeframes. I really need a solution for this, otherwise I can’t use PRT!!! Why is there only the inbuild variable dhigh/dlow? In other platforms are OHLC values avaailable for every Timeframe. This one of the basic tools and should be simple!!! How can I contact Prorealtime directly in order to implement this?
04/05/2019 at 11:05 AM #95523You can change custom trading hours by right clicking on a price chart then change the week-end data display in this window.
As you already surely know, there is no multi-timeframe support for indicators. You can contact PRT on their website.
but every other OHLC (Hour, Week, Month etc.) doesn’t work correct in the several timeframes.
They don’t exist, you have to calculate them. Be sure to have sufficient units displayed in order to get the calculation right.
04/05/2019 at 11:44 AM #95526Ok, I tried, but nothing changed – see attachment below. The previous High/Low are still wrong.
Sure, previous OHLC values have to be calculated! BUT due to several other settings this is difficult for the USER. This makes it time consuming for the USER!!! With the variable Dhigh/Dlow everything works fine!!!! So users also need further variables for Hour/Month/Week etc. High/Low (even better OHLC). In this Forum so many users have problems with this!!! Just an example below out of TradingView. Within one line of code I can adress every OHLC within every previous hour/day/week/month and I can plot his information in every chart with every timeframe. If I change the exchange hours in TradingView, the calculation simply adapts the OHLC to the new exchange hours – VERY SIMPLE. Also easy possible in other charting software….
To put it simple: Like Dhigh and Dlow, which exist now in PRT, further varibales are needed.
//Monthly
mo = security(tickerid, ‘M’, open[1], lookahead=barmerge.lookahead_on)
mc = security(tickerid, ‘M’, close[1], lookahead=barmerge.lookahead_on)
mh = security(tickerid, ‘M’, high[1], lookahead=barmerge.lookahead_on)
ml = security(tickerid, ‘M’, low[1], lookahead=barmerge.lookahead_on)
//Weekly
wo = security(tickerid, ‘W’, open[1], lookahead=barmerge.lookahead_on)
wc = security(tickerid, ‘W’, close[1], lookahead=barmerge.lookahead_on)
wh = security(tickerid, ‘W’, high[1], lookahead=barmerge.lookahead_on)
wl = security(tickerid, ‘W’, low[1], lookahead=barmerge.lookahead_on)
//Daily
do = security(tickerid, ‘D’, open[1], lookahead=barmerge.lookahead_on)
dc = security(tickerid, ‘D’, close[1], lookahead=barmerge.lookahead_on)
dh = security(tickerid, ‘D’, high[1], lookahead=barmerge.lookahead_on)
dl = security(tickerid, ‘D’, low[1], lookahead=barmerge.lookahead_on)
//1 Hour
oho = security(tickerid, ’60’, open[1], lookahead=barmerge.lookahead_on)
ohc = security(tickerid, ’60’, close[1], lookahead=barmerge.lookahead_on)
ohh = security(tickerid, ’60’, high[1], lookahead=barmerge.lookahead_on)
ohl = security(tickerid, ’60’, low[1], lookahead=barmerge.lookahead_on)04/05/2019 at 11:53 AM #95528also need further variables for Hour/Month/Week
I agree. I’m helping people program things here since 3 years, do you think you are the first one to ask for multi timeframe instruction? Or OHLC constant for other timeframes? No, you are not the first one, and we are counting almost 20.000 members now.
I understand that this is frustrating, but solutions exist with codes, and even if it is not the easy way, me, you, we, have to deal with it.
Feel free to drop a suggestion to ProRealTime by using their suggestion box, here: https://www.prorealtime.com/en/contact?suggestion=1
-
AuthorPosts
Find exclusive trading pro-tools on