Big Body Candle
Forums › ProRealTime English forum › ProBuilder support › Big Body Candle
- This topic has 26 replies, 2 voices, and was last updated 4 years ago by parthapersonal.
-
-
07/29/2020 at 3:50 AM #140351
Hi,
I am trying to identify the big body candle out of last 12 candles, but the code is returning “nil or none”. Any help would be much appreciated.
Regards,
Big Body Candle1234567891011121314151617181920DEFPARAM CalculateOnLastBars = 1000Bullish = close > openBearish = close < openBigBody = HIGHEST[p](abs(close-open))//BearishBigBody = HIGHEST[p]((open-close))//// UP trend detection//Count1 = 0 i = 0 WHILE Count1 <= p AND i < BarIndex i = i + 1 IF Count1 = 0 THEN IF Bullish[i] THEN Count1 = 1 MyHigh = BullishBigBody[i] ENDIF ENDIF WENDd1=Bullishd2=BigBodyUCond= d1 and d2d3=BearishDCond= d2 and d3cond=0if Ucond thencond=1elsif Dcond thencond=-1endifreturn cond as "BigBody"07/29/2020 at 3:51 AM #140352“p” is a variable having value as 12
07/29/2020 at 9:04 AM #140357Try replacing line 4 with:
1BigBody = abs(close - open) = HIGHEST[p](abs(close-open))07/29/2020 at 12:56 PM #140367Many thanks Robert. It worked. Appreciate your fast and reliable response. Just a question, why there are 2 “=” signs in
BigBody = abs(close – open) = HIGHEST[p](abs(close–open))
07/29/2020 at 1:50 PM #140375Because it first checks that the body is the highest one within the last p bars:
1abs(close – open) = HIGHEST[p](abs(close–open))then the boolean value returned (true or false) is assigned to variable BigBody.
07/30/2020 at 2:38 PM #140472Many thanks Robert. However, when I created the boundary (Upper Line and Lower Line) of the BigBody and then tried to identify the Bounce from those lines based on the conditions as per enclosed PRT, it is missing the correct signals and generating false or Late signals somewhere else as shown in the enclosed chart. Can you please enlighten what is wrong here.
Regards,
BigBody-Line-Bounce1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950DEFPARAM CalculateOnLastBars = 1000Bullish = close > openBearish = close < openBigBody = abs(close - open) = HIGHEST[p](abs(close-open))d1=Bullishd2=BigBodyUCond= d1 and d2d3=BearishDCond= d2 and d3if Ucond thencond=1elsif Dcond thencond=-1endif//// Creating high and low lines for the "BIGBODY"if cond=1 thenhighline=highlowline=lowelsif cond=-1 thenhighline=highlowline=lowendif//Heikin-ashiif barindex>1 thenhc=(open+close+low+high)/4ho=(ho[1]+hc[1])/2xHigh = Max(hO, hC)xLow = Min(hO, hC)hh = Max(High,xHigh)hl = Min(Low,xLow)endif//// BOUNCE IdentificationIF cond=-1 AND HH[1]>highline[1] AND HC<highline THENOBS=-64ELSIF cond=-1 AND HH>highline AND HC<highline THENOBS=-64ELSIF cond=1 AND HL[1]<lowline[1] AND HC>lowline THENOBS=64ELSIF cond=1 AND HL<lowline AND HC>lowline THENOBS=64ELSEOBS=0ENDIFreturn OBS as "BigBody-Line-Bounce"07/30/2020 at 2:48 PM #140477What value is P?
What date & time are those candlesticks?
07/30/2020 at 11:40 PM #140525Sorry Robert, P is 15 and chart is of 5 min for GBPUSD as shown in the chart. Your help would be much appreciated.
Regards,
07/30/2020 at 11:42 PM #140527Date was 30.07.2020
07/31/2020 at 1:57 PM #140555What TZ is it, compared tu UTC ?
08/01/2020 at 11:37 AM #140598Hello Robert,
Thank you for your response, however there is no “TZ” or “UTC” in the code. Where did you find them? I am again pasting the code for your reference.
Regard
BigBody- Line- Bounce1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950DEFPARAM CalculateOnLastBars = 1000Bullish = close > openBearish = close < openBigBody = abs(close - open) = HIGHEST[p](abs(close-open))d1=Bullishd2=BigBodyUCond= d1 and d2d3=BearishDCond= d2 and d3if Ucond thencond=1elsif Dcond thencond=-1endif//// Creating high and low lines for the "BIGBODY"if cond=1 thenhighline=highlowline=lowelsif cond=-1 thenhighline=highlowline=lowendif//Heikin-ashiif barindex>1 thenhc=(open+close+low+high)/4ho=(ho[1]+hc[1])/2xHigh = Max(hO, hC)xLow = Min(hO, hC)hh = Max(High,xHigh)hl = Min(Low,xLow)endif//// BOUNCE IdentificationIF cond=-1 AND HH[1]>highline[1] AND HC<highline THENOBS=-64ELSIF cond=-1 AND HH>highline AND HC<highline THENOBS=-64ELSIF cond=1 AND HL[1]<lowline[1] AND HC>lowline THENOBS=64ELSIF cond=1 AND HL<lowline AND HC>lowline THENOBS=64ELSEOBS=0ENDIFreturn OBS as "BigBody-Line-Bounce"08/01/2020 at 2:55 PM #140615It’s your TZ.
Mine is UTC + 1 DST (currently Utc+2), so when I see a candle in your pic at 11am, what 11am is it? it is UTC+???
Moreover, are you with IG?
08/02/2020 at 9:51 AM #140642Sorry Robert, I thought you are asking about TZ and UTC as variable in the code.
Our time zone (TZ) is UTC+ 10
Yes, we are using PRT (v10.3 – 1.8.0-_202) from IG
08/03/2020 at 2:27 PM #140737I can’t see anything wrong with those candlesticks. If you think some of them are wrong (late or missing), please let me know, for each candle (use their time tag):
- the value of that candle
- the highest value calculated to compare them.
Moreover:
- you are mixing some computations on HA candles (lines 38-44) and regular japanese candles (the rest of the code)
- lines 19-25 show two dfferent conditions, but the value you assign to variables is the same for both.
If you explain the details of waht you want to achieve I might be able to help you better.
08/04/2020 at 1:08 PM #140859Hello Robert, thank you for your response. Appreciate. I am trying to do the following steps:
1. Identify Big body bar
2. Identify the high and low of the Big body bar to draw horizontal high line (HL) and low line (LL) on its high and low
3. Identify whether the Big body bar is bullish or bearish
4. Identify bounce Short opportunity: If bearish big body (B) and any heikin ashi bar (A)’s high, after the bearish big body (B), is higher than the high line (HL) (red line) and heikin ashi close (HC) of the same bar (A) is lower than high line (HL) then print OBS as -64
5. Identify bounce Long opportunity: If bullish big body (BB) and any heikin ashi bar (AA)’s low, after the BB, is lower than the low line (LL) and heikin ashi close (HC) of the same bar (AA) is higher than low line (LL) then print OBS as 64
Trust this help.
The missed signal’s time stamps are as below:
Symbol: GBPUSD mini
Date: 30.07.2020
Time: 11:05, 12:50, 13:55, 14:40, 15:40
Regards,
-
AuthorPosts
Find exclusive trading pro-tools on