Could anyone please help me with the code for finding High/Low/Close of a Heikin-Ashi candle on 5 minute time frame ,and move the stop loss to the high/low of the last two Heikin-Ashi candle when candle closes (if price moved favourably) please.
Thanks in Advance
Could anyone please help me with
This is much more likely to happen if you post your topic in the correct forum as clearly described in the forum rules. I moved it for you.
Post your topic in the correct forum:
_ ProRealTime Platform Support: only platform related issues.
_ ProOrder: only strategy topics.
_ ProBuilder: only indicator topics.
_ ProScreener: only screener topics
_ General Discussion: any other topics.
_ Welcome New Members: for new forum members to introduce themselves.
Also please observe this one:
- Give your topic a meaningful title. Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.
I changed your title for you.
This is the code to define (and detect) HA candlesticks:
once xOpen = open
xClose = (open + close + high + low) / 4
if barindex > 0 then
xOpen = (xOpen + xClose[1]) / 2
endif
xLow = min(low,min(xClose,xOpen))
xHigh = max(high,max(xClose,xOpen))
xTypic = (xHigh + xLow + xClose) / 3
xMed = (xHigh + xLow) / 2
xRange = xHigh - xLow
xBody = abs(xOpen - xClose)
you can reference any price you want, like regular candlesticks, just use xClose instead of Close etc…