Heikin Ashi: Close trade based on current candle current price or prev candle close price
-
Hi,
I have gone through heaps of forum questions, cant get to a solution. I am building an EA to trade based on Heikin Ashi (HA).I need my EA to close a long trade if:
- HA current-candle current-price is 2% below HA current-candle open-price
OR
- HA current-candle current-price is 2% below HA previous-candle close-price.
I have tried block - pips away but it doesnt close the trade at the expected 2% loss but closes at the close price of HA candle. By then I am already down 4-5%.
Can someone attach an fxdreema model that does what I want to do.
Many thanks
-
Just to better understand what you need. Conditions are:
- Current price right now is 2% below HA current candle's open
OR - Current price is 2% below HA candle ID 1's close.
Is that correct? I don't understand why you specify HA at the beginning of both cases when you just need current price.
- Current price right now is 2% below HA current candle's open
-
@l-andorrà I think 2 conditions are necessary maybe due to gaps - not sure, just a guess.
-
@l-andorrà Thanks, you have understood it correctly. And I have added HA because I need 2% below HA price, not market price. HA price is different from market price. HA Open, Low, High and Close are derived from actual market prices and therefore are not the same as market price. Thanks in advance.
-
Ok. Try this. I didn't tested, though.

-
@l-andorrà Hi, thankyou! I will try and get back to you. Regards