I am trying to develop a strategy in Pine Script, but if you don't Pine Script, that's alright. I just need to know how the logic will work in order to implement it. My strategy is to take trades when signals fire on the heikin ashi chart. My problem is - when I backtest using the heikin ashi chart, it shows buy and sell values from heikin ashi price as opposed to the real price. Since the heikin ashi price uses previous bars and OHLC, I'm getting unrealistic results. Is there any way for the backtest to show the real price as opposed to heikin ashi prices using the heikin ashi signals? Thank you
I guess you would need to keep track of both the heikin ashi price and the real price. And somehow combine your heikin ashi signals and signals from the real price. Due to the nature of heikin ashi, is it a delayed price. Reacting on heikin ashi price, you might be too late.
On a related note, OP might find some inspiration from Heikin Ashi derived works and enhancements such as HACO (Heikin Ashi Candlestick Oscillator), HACOLT (HACO Long-Term) r SVEHaTypCross by Sylvain Vervoort. Not sure about Pine Script but they're available in WealthScript for sure. -Eugene
That's kinda the idea. I wanted to reduce the number of trades. I typed in the heikin ashi formula and used that as my variable, and replaced all of my "open position on bar close" commands to the variable, but yet for whatever reason, the trades are not firing at the correct times.