Bank Level indicator
Forums › ProRealTime English forum › ProBuilder support › Bank Level indicator
- This topic has 13 replies, 7 voices, and was last updated 4 years ago by tobytarczy.
-
-
12/29/2017 at 5:14 PM #56825
Hi All,
I came across Paul Langham’s channel on You tube and in it he mentioned an indicator than draws in lines which he says the banks ‘trade’ at (I.e they often make a move at).
Basically it seems to consist of the highs and lows for the last :-
10 weeks
10 Months
10 Quarters
10 Years
I am not a coder which can be seen from my daily level effort which I have attached.
Daily High/Low1234567891011x = ifor i = 1 to 10 donexta = DHigh(x)b = DLow(x)DRAWHLINE(a)DRAWHLINE(b)returnIt doesnt seem to work as intended :o(
Can someone give me some direction? I tried to substitue Dhigh for Month[high] and it said it expected a positive value?
Regards
BN
01/03/2018 at 6:34 PM #57166I just made this rough code for this purpose, it only calculates the last 10 weeks and 10 months highest high and lowest low, not tested but should be ok.
I’ll try to add the other levels later, time to rest a bit now 🙂
12345678910111213141516171819202122232425262728293031323334353637383940414243444546Once lastWeekBarIndex = 0Once weeklyHigh = undefinedOnce weeklyLow = undefinedOnce lastMonthBarIndex = 0Once monthlyHigh = undefinedOnce monthlyLow = undefinedIf DayOfWeek<DayOfWeek[1] thencountw=countw+1weeklyHigh = Highest[BarIndex - lastWeekBarIndex](High)[1]weeklyLow = Lowest[BarIndex - lastWeekBarIndex](Low)[1]lastWeekBarIndex = BarIndexhhw=max(hhw,weeklyhigh)llw=min(llw,weeklylow)if countw=10 thenweeks10hi = hhwweeks10lo = llwhhw = 0llw = close*1000countw = 0endifEndifIf Month<>Month[1] thencountm=countm+1monthlyHigh = Highest[BarIndex - lastMonthBarIndex](High)[1]monthlyLow = Lowest[BarIndex - lastMonthBarIndex](Low)[1]lastMonthBarIndex = BarIndexhhm=max(hhm,monthlyhigh)llm=min(llm,monthlylow)if countm=10 thenmonths10hi = hhmmonths10lo = llmhhm = 0llm = close*1000countm=0endifEndifReturn weeks10hi as "10 weeks high", weeks10lo as "10 weeks low", months10hi as "10 months high", months10lo as "10 months low"01/04/2018 at 4:31 PM #57259Cheers Nicolas,
I will have a play around with it when I get in tonight
08/30/2018 at 7:36 PM #79429how do i use the code? copy paste in mt4 ? also how to code for yearly and quaterly
08/31/2018 at 9:21 PM #79489how do i use the code? copy paste in mt4 ? also how to code for yearly and quaterly
The code is for use with ProRealTime only. This is a forum dedicated to ProRealTime code – it is not a place to find MQ4 code solutions.
11/22/2019 at 3:33 PM #11342811/22/2019 at 5:16 PM #11343111/22/2019 at 7:11 PM #11344411/22/2019 at 8:16 PM #113449Sorry but that screen shot is not clear enough to read. I just cut and pasted Nicolas’ code into a new indicator and it works fine. What instrument and time frame are you applying it to so that everyone else can try to get the same error?
11/23/2019 at 12:14 AM #113457It seems there’s a wrong value within brackets with HIGHEST and LOWEST.
Try using
1[max(1,BarIndex - lastWeekBarIndex)]at lines 11-12, and
1[max(1,BarIndex - lastMonthBarIndex)]at lines 29-30.
11/23/2019 at 8:25 AM #113463Perhaps it is trying to get the values on the first bar of a chart (barindex = 0) so that would create a negative value in the HIGHEST and LOWEST brackets. So you could just enclose the main code within the following IF THEN ENDIF to avoid this:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849Once lastWeekBarIndex = 0Once weeklyHigh = undefinedOnce weeklyLow = undefinedOnce lastMonthBarIndex = 0Once monthlyHigh = undefinedOnce monthlyLow = undefinedif barindex > 0 thenIf DayOfWeek<DayOfWeek[1] thencountw=countw+1weeklyHigh = Highest[BarIndex - lastWeekBarIndex](High)[1]weeklyLow = Lowest[BarIndex - lastWeekBarIndex](Low)[1]lastWeekBarIndex = BarIndexhhw=max(hhw,weeklyhigh)llw=min(llw,weeklylow)if countw=10 thenweeks10hi = hhwweeks10lo = llwhhw = 0llw = close*1000countw = 0endifEndifIf Month<>Month[1] thencountm=countm+1monthlyHigh = Highest[BarIndex - lastMonthBarIndex](High)[1]monthlyLow = Lowest[BarIndex - lastMonthBarIndex](Low)[1]lastMonthBarIndex = BarIndexhhm=max(hhm,monthlyhigh)llm=min(llm,monthlylow)if countm=10 thenmonths10hi = hhmmonths10lo = llmhhm = 0llm = close*1000countm=0endifEndifendifReturn weeks10hi as "10 weeks high", weeks10lo as "10 weeks low", months10hi as "10 months high", months10lo as "10 months low"06/03/2020 at 3:06 PM #134412Hi
I think there is a lot more to these levels than meets the eye. From my understanding these levels include a number of variables that help to define the level itself, such as, how recent has the level been hit, if the market goes through the level, which would be a negative score, volume or number of transactions at the level, etc. this is based on an indicator I have used on MT4 where this was the case. I think what Paul Langham has developed is similar to the tool, maybe more advanced.
I would love to have such an indicator as it is really helpful in setting up a trade in determining stops and targets. If someone knows how to get this in PRT that would be great.
Toby
06/03/2020 at 4:30 PM #13443206/03/2020 at 4:45 PM #134435Hi, Let me see if I can get the details you need from my source. Many thanks
-
AuthorPosts
Find exclusive trading pro-tools on