Heiken Ashi Long/Short
Forums › ProRealTime English forum › ProOrder support › Heiken Ashi Long/Short
- This topic has 13 replies, 4 voices, and was last updated 6 years ago by TRezin.
-
-
04/20/2018 at 9:27 PM #6888804/20/2018 at 10:27 PM #6889004/21/2018 at 9:01 PM #68920
TRezin,
Kindly try first the search engine of this site. It is quite an efficient tool were you’ll find everthing you need..
https://www.prorealcode.com/prorealtime-trading-strategies/simple-heiken-ashi-trading-strategy/
Thank you.
1 user thanked author for this post.
04/24/2018 at 7:26 PM #6910004/24/2018 at 10:27 PM #69104Hello Inertia,
Sorry but the code you provide dose not quite enter on the green and red. Could you help me again and adjust the code as follows:
Buy on close of Green Hieken Ashi candle
Sell when the Red Hieken Ashi candle closes below the 13EMA
I dont want a short position.
Thanks
Tony
04/25/2018 at 6:14 AM #69112Hi TRezin,
I just helped you out on how to search on this great forum.
Kindly note that I am not a coder but I have done the following according to your request.
To be verified 😉
HA Long123456789101112131415161718xClose = (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 MARKETendifindicator1 = ExponentialAverage[13](close)c2 = (close CROSSES UNDER indicator1)IF c2 THENSELL AT MARKETENDIF04/25/2018 at 7:29 PM #69163Hello,
Thanks for your help again.
I have added some codes to your system that are proven to show good back testing now.
I have attached for you.
Thanks
Tony
Rezin 4 Hour Long System1234567891011121314151617181920212223242526272829xClose = (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 MARKETendifindicator1 = ExponentialAverage[20](close)c2 = (close CROSSES UNDER indicator1)indicator2 = RSI[30](open)c3 = (indicator2 >50)indicator3 = CCI[65](open)c4 = (indicator3 >75)IF c2 and c3 and c4 THENSELL AT MARKETENDIF// stops and targetsatr = averagetruerange[14](close)set stop ploss atr*2.504/25/2018 at 8:02 PM #6917112345678910111213141516171819202122232425262728xClose = (Open+High+Low+Close)/4if(barindex>2) thenxOpen = (xOpen[1] + xClose[1])/2endifc1 = xClose>xOpen AND xClose[1]<xOpen[1]indicator2 = RSI[30](open)c3 = (indicator2 >51)indicator3 = CCI[65](open)c4 = (indicator3 >10)if c1 and c3 and c4 and Not LongOnMarket thenBUY 1 SHARE AT MARKETendifindicator1 = ExponentialAverage[20](close)c2 = (close CROSSES UNDER indicator1)IF c2 THENSELL AT MARKETENDIF// stops and targetsatr = averagetruerange[25](close)set stop ploss atr*2.5Sorry thats it sorted.
Thanks
04/25/2018 at 8:25 PM #6917204/25/2018 at 9:38 PM #69174Inertia,
If you have time
One more thing. Do you know why this code is not shorting the market?
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748//conditions to enter long positionsc1 = Close<Open[5] and Close>Close[3]indicator2 = RSI[30](close)c3 = (indicator2 >50)indicator3 = CCI[65](close)c4 = (indicator3 >65)indicator4 = exponentialaverage[20](close)c5 = (close >indicator4)if c1 and c3 and c4 and c5 and Not LongOnMarket thenBUY 1 SHARE AT MARKETendif// conditions to exit long positionsindicator1 = ExponentialAverage[50](close)c2 = (close CROSSES UNDER indicator1)IF c2 THENSELL AT MARKETENDIF//conditions to enter short positionsc6 = Close>Open[5] and Close<Close[1]indicator2 = RSI[30](close)c7 = (indicator2 <50)indicator3 = CCI[65](close)c8 = (indicator3 <-10)indicator4 = exponentialaverage[20](close)c9 = (close >indicator4)if c6 and c7 and c8 and c9 and Not shortOnMarket thenBUY 1 SHARE AT MARKETendif// conditions to exit long positionsindicator1 = ExponentialAverage[50](close)c10 = (close CROSSES over indicator1)IF c10 THENSELL AT MARKETENDIF// stops and targetsatr = averagetruerange[14](close)set stop ploss atr*2.5Thanks
04/25/2018 at 9:54 PM #69178Inertia,
If you have time
One more thing. Do you know why this code is not shorting the market?
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748//conditions to enter long positionsc1 = Close<Open[5] and Close>Close[3]indicator2 = RSI[30](close)c3 = (indicator2 >50)indicator3 = CCI[65](close)c4 = (indicator3 >65)indicator4 = exponentialaverage[20](close)c5 = (close >indicator4)if c1 and c3 and c4 and c5 and Not LongOnMarket thenBUY 1 SHARE AT MARKETendif// conditions to exit long positionsindicator1 = ExponentialAverage[50](close)c2 = (close CROSSES UNDER indicator1)IF c2 THENSELL AT MARKETENDIF//conditions to enter short positionsc6 = Close>Open[5] and Close<Close[1]indicator2 = RSI[30](close)c7 = (indicator2 <50)indicator3 = CCI[65](close)c8 = (indicator3 <–10)indicator4 = exponentialaverage[20](close)c9 = (close >indicator4)if c6 and c7 and c8 and c9 and Not shortOnMarket thenBUY 1 SHARE AT MARKETendif// conditions to exit long positionsindicator1 = ExponentialAverage[50](close)c10 = (close CROSSES over indicator1)IF c10 THENSELL AT MARKETENDIF// stops and targetsatr = averagetruerange[14](close)set stop ploss atr*2.5Thanks
04/25/2018 at 10:55 PM #69181Do you know why this code is not shorting the market?
Because there is no SELLSHORT instruction in the code.
1 user thanked author for this post.
04/26/2018 at 5:41 AM #6918704/26/2018 at 6:33 AM #69189 -
AuthorPosts
Find exclusive trading pro-tools on