Heiken Ashi confusion price to open orders
Forums › ProRealTime English forum › ProOrder support › Heiken Ashi confusion price to open orders
- This topic has 6 replies, 2 voices, and was last updated 3 years ago by verygrubby.
-
-
12/24/2020 at 4:15 PM #155148
Hello all. I’m trying to work out a strategy using Heiken Ashi candlesticks. In the strategy I’m using the usual code to generate the open and close of the bars (eg Heiken Ashi close = (Open+High+Low+Close)/4. Heiken Ashi open = (xOpen[1] + xClose[1])/2.
Now, the trades are triggering at the expected bars (ie according to Heiken Ashi), but the trade levels are as per the normal candlestick levels for that bar, NOT the Heiken Ashi levels as expected.
eg when I run the strategy & check the trades on the chart, the trade levels only match the opening of that bar when I switch the price chart style back to “Candlestick” rather than Heiken Ashi.
Is this a bug, or am I misunderstanding how things are supposed to work when using Heiken Ashi charts?
Many thanks
12/24/2020 at 4:44 PM #155150Without the code it’s impossible to help.
If you use a pending order to enter a trade at the high of the current candle you may use HIGH or xHIGH (or haHIGH):
12Buy 1 contract at High StopBuy 1 contract at XHigh Stopthe first uses regular japanese candlesticks, while the latter uses HA candlestick.
Post the code so we can help.
12/24/2020 at 5:24 PM #1551561234567891011121314151617xClose = (Open+High+Low+Close)/4if(barindex>2) thenxOpen = (xOpen[1] + xClose[1])/2endifc1 = xClose>xOpen AND xClose[1]<xOpen[1]if c1 AND Not LongOnMarket thenBUY 1 SHARE AT MARKETendifSET TARGET pPROFIT 1000SET STOP pLOSS 1000So this just buys when the Heiken Ashi candle goes from red to green, on a 15m Dow chart. eg Look at the trade it opened at 21:45 on 4th November 2020. The long opened at 27,964… but this price is the open of the normal candlestick bar for 21:45… the Heiken Ashi 21:45 candle opened at approx 27,903… So, the bar at which it opens the trade is fine, but how do I get it to open at the Heiken Ashi level, rather than the normal candlestick bar level?
Would your suggested solution work if I simply put “Buy 1 contract at Xclose Stop”?
12/24/2020 at 5:48 PM #155159Heikin-Ashi is just an indicator, not the real price, that let’s you arrange price in a different way… so when you enter/exit at market, the real price is always used.
If you want to avoid this you need to use pending orders using HA prices as entry/exit point, such as:
1BUY 1 CONTRACT AT xHigh STOP12/24/2020 at 6:02 PM #155160Thanks for your help on Christmas Eve, by the way!
I tried using:
1Buy 1 contract at Xopen STOP…but it makes no difference. Still opens the trades at the normal candlestick levels, not the Heiken Ashi levels…
12/24/2020 at 6:21 PM #155161xOpen is a better price to BUY so you should use LIMIT instead of STOP, otherwise it will BUY at market.
12/24/2020 at 6:53 PM #155164Aha… that seems to be getting better results – thanks for your help, & Merry Christmas!
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on