Kindly change to Prorealcode. Thanks in advance
#System
#PARAM “Wick_Multiplier”, 2.5, .5, 20
#PARAM “Body_Percentage”, .25, .1, 1
If C > O _
AND (O – L) >= ((C – O) * Wick_Multiplier) _
AND (H – C) <= ((H – L) * Body_Percentage) _
OR C < O _
AND (C – L) >= ((O – C) * Wick_Multiplier) _
AND (H – C) <= ((H – L) * Body_Percentage) _
OR C = O AND NOT C = H _
AND (H – L) >= ((H – C) * Wick_Multiplier) _
AND (H – C) <= ((H – L) * Body_Percentage) _
OR O = H AND C = H _
AND H – L >= AVG(H-L, 50) Then
Signal = LongSignal
ElseIf C < O _
AND (H – O) >= ((O – C) * Wick_Multiplier) _
AND (C – L) <= ((H – L) * Body_Percentage) _
OR C > O _
AND (H – C) >= ((C – O) * Wick_Multiplier) _
AND (C – L) <= ((H – L) * Body_Percentage) _
OR C = O AND NOT C = L _
AND (H – L) >= ((C – L) * Wick_Multiplier) _
AND (C – L) <= ((H – L) * Body_Percentage) _
OR O = L AND C = L _
AND H – L >= AVG(H-L, 50) Then
Signal = ShortSignal
End If
JSParticipant
Senior
WickMultiplier = 2.5 // min 0.5, max 20
BodyPercentage = .25 // min 0.1, max 1
TopBody = max(close, open)
BottomBody = min(close, open)
BodySize = TopBody - BottomBody
TopWickSize = high - TopBody
BottomWickSize = BottomBody - low
WickRange = Average[50](high - low)
BullSignal = (BottomWickSize > (WickMultiplier*BodySize)) and (close > (low + (WickRange*(1-BodyPercentage))))
BearSignal = (TopWickSize > (WickMultiplier*BodySize)) and (close < (low + (WickRange*BodyPercentage)))
Return BullSignal as "BullSignal" Coloured(0,255,0) , BearSignal as "BearSignal" Coloured(255,0,0)
Hi @oyinloyea
I converted the code into a slightly more understandable version.