Heikin Ashi Auto buy/sell based on collor change
Forums › ProRealTime English forum › ProOrder support › Heikin Ashi Auto buy/sell based on collor change
- This topic has 22 replies, 4 voices, and was last updated 5 years ago by robertogozzi.
Tagged: ashi, HA, heikin, heikin ashi
-
-
10/15/2019 at 7:19 PM #110265
Hi.
Does anybody know the code for automated system based only on Heikin ashi changing collors buy and sell.
I want to automate my heikin ashi strategi.
It might have allready been discussed here on the forums, but i cant seem to find it.
Thank you
10/15/2019 at 9:59 PM #110278There you go:
12345678910111213141516171819// Heikin Ashi setuponce xOpen = openxClose = (open + close + high + low) / 4if barindex > 0 thenxOpen = (xOpen + xClose[1]) / 2endifxLow = min(low,min(xClose,xOpen))xHigh = max(high,max(xClose,xOpen))//Bullish = xClose > xOpenBearish = xClose < xOpen// LONG trades when switching from bearish to bullishIF Bullish AND Bearish[1] THENBUY 1 CONTRACT AT MARKETENDIF// SHORT trades when switching from bullish to bearishIF Bearish AND Bullish[1] THENSELLSHORT 1 CONTRACT AT MARKETENDIF1 user thanked author for this post.
10/15/2019 at 10:54 PM #110281Thank you alot robertogozzi.
Is it possible to create this code from prorealtime simplified creation?
10/15/2019 at 11:17 PM #110285No, it’s not possible. The set up for the Heikin Ashi candlesticks cannot be dealt with automatically.
10/15/2019 at 11:25 PM #110286No, it’s not possible. The set up for the Heikin Ashi candlesticks cannot be dealt with automatically.
Ok thanks. I still cant get my head arround that code you shared. i tried to prompt it in as whole and promt it in as bullish by deleting som of the code, but still it does not work.
I would be very gratefull if you can do one separate bullish. with conditions when heikin is positiv go long 1 contract next bar open and exit that contract on heiking going negative, exit next bar open.
and then do the same one separate to bearish if you know what i mean.
Thank you alot mr.
10/15/2019 at 11:40 PM #110288The last line (line 19) was to be read ENDIF.
Bullish version:
LONG trades on HA colour switch12345678910111213141516171819// Heikin Ashi setuponce xOpen = openxClose = (open + close + high + low) / 4if barindex > 0 thenxOpen = (xOpen + xClose[1]) / 2endifxLow = min(low,min(xClose,xOpen))xHigh = max(high,max(xClose,xOpen))//Bullish = xClose > xOpenBearish = xClose < xOpen// LONG trades when switching from bearish to bullishIF Bullish AND Bearish[1] THENBUY 1 CONTRACT AT MARKETENDIF// exit LONG trade on a Bearish candlestickIF Bearish AND LongOnMarket THENSELL AT MARKETENDIFBearish version:
12345678910111213141516171819// Heikin Ashi setuponce xOpen = openxClose = (open + close + high + low) / 4if barindex > 0 thenxOpen = (xOpen + xClose[1]) / 2endifxLow = min(low,min(xClose,xOpen))xHigh = max(high,max(xClose,xOpen))//Bullish = xClose > xOpenBearish = xClose < xOpen// SHORT trades when switching from bullish to bearishIF Bearish AND Bullish[1] THENSELLSHORT 1 CONTRACT AT MARKETENDIF// exit SHORT trade on a Bullish candlestickIF Bullish AND ShortOnMarket THENEXITSHORT AT MARKETENDIF1 user thanked author for this post.
10/15/2019 at 11:43 PM #110289classick – Welcome to the forums. 🙂
You have posted the same reply three times. I have deleted two of the posts. Please try not to post the same thing multiple times!
Also it is not necessary to quote the person that you are replying to in every reply – especially when only two people are discussing a subject! Please only quote if you want to highlight a certain bit of text or if you need to make it clear who you are replying to.
1 user thanked author for this post.
10/15/2019 at 11:48 PM #11029110/15/2019 at 11:56 PM #11029310/15/2019 at 11:59 PM #110294Compare your code and mine to spot differences.
10/15/2019 at 11:59 PM #11029510/16/2019 at 12:07 AM #11029610/16/2019 at 12:10 AM #110297thank you Robertogozzi for helping me out
i compared the codes and they are identical.
I just ctrl+c and then paste on to my prorealtime. Then go thrue visually on any spaces that differ. everything looks fine. but still not valid.
i must be doing something wrong. Damn i need those learning courses in coding
10/16/2019 at 12:15 AM #110298Please post the error message you have been reported.
10/16/2019 at 12:17 AM #110299 -
AuthorPosts
Find exclusive trading pro-tools on