Ichimoku W Max ADX stop K/SB
Forums › ProRealTime English forum › ProOrder support › Ichimoku W Max ADX stop K/SB
- This topic has 16 replies, 6 voices, and was last updated 4 years ago by Fran55.
-
-
04/06/2020 at 8:55 AM #124268
Backtest with Ichimoku, Maximum 36 periods, ADX, MACD and stop with Ichimoku, MACD and %Williams
1234567891011121314151617181920212223242526272829303132333435363738DEFPARAM CumulateOrders=FalseDEFPARAM NOCASHUPDATE = FalseREM Comprar/Comprare/Acheter/BuymyKijun, myTenkan, myChikou, mySpanA, mySpanB = CALL "Ign Ichimoku 1"[0](close)c1 = (Close > myTenkan)c2 = (Close > myKijun)c3 = (Close > mySpanA)c4 = (Close > mySpanB)c5 = (Close > Close[26])c6 = (MACDline[12,26,9](close) > 0)c61 = (MACDline[12,26,9](close) > MACDSignal[12,26,9](close))c7 = (Close = highest[n] (close))c8 = (ADX[14] > ADX[14][1])c9 = (ADX[14] > DIminus[14](close))c10 = (DIplus[14](close) > DIminus[14](close))IF c1 and c2 and c3 and c4 and c5 and c6 and c61 and c7 and c8 and c9 and c10 THENBUY 1000 cash AT MARKETENDIFcoste = tradepriceREM Vender/Vendere/Vendre/Sellif (coste > myKijun) thenmyStop = myTenkanelsif (coste < myKijun) and (coste > mySpanB) thenmyStop = myKijunelsif (coste < mySpanB) thenmyStop = mySpanBendifIF close < myStop or Williams[14](close) < -80 or MACDline[12,26,9](close) < 0 THENsell at market//SELL AT myStop STOPENDIF04/06/2020 at 9:05 AM #124767Hi! Thanks for sharing your trading strategy idea. Would you mind to tell us more about it please? What is the timeframe to be used? And for what instrument? It seems to work well on major trend, by looking at the picture you provide! 🙂
04/06/2020 at 9:58 AM #124779Line 13 is incorrect, MACDSignal is not a PRT recognised Indicator (it should be … it would make our lives easier!?)
Surely it can only work if coded as …
1c61 = (MACDline[12,26,9](close)) > ExponentialAverage[9](MACDline[12,26,9](close))04/06/2020 at 10:25 AM #124794MACDSIGNAL is now an instruction in PRTv11.
https://www.prorealcode.com/documentation/macdsignal/
I think we might be reaching the time where it would be useful if people mentioned the version number if they coded it on v11.
1 user thanked author for this post.
04/06/2020 at 11:36 AM #124821Dear Nicolas,
Only for Weekly, confirmed with monthly.
I send you a indicator than can help you for decissions.
I work only with sotcks and I select only the best stocks for financials, growth and moat.
If you need something else write me.
I apologize for my bad english. I’m spanish 😉
04/06/2020 at 11:46 AM #12482404/06/2020 at 12:27 PM #124832Anybody else tried this on v10.3?
Trying with the latest codes above, I get the attached errors. (The original code on the original post had similar errors also).
Even if I include below then more errors messages show … e.g. cc is not used.
12If MyChikou or my0 OR Mybs or mybi or mycoste ThenEndif@inavsan does the above code work perfectly fine on your Platform??
04/06/2020 at 12:49 PM #124846Update:
I’ve got it working now after making a few changes here and there.
I will post the amended code shortly … results looks good!!
1 user thanked author for this post.
04/06/2020 at 1:16 PM #124852Ichimoku is a very good indicator on its own. I think it doesn’t need any other indicator.
Therfore I have tested it without Macd and ADX (green) (c1, c2, c3, c4 and c5)
and also with Macd and ADX (bleu) (c1, c2, c3, c4, c5, c6, c61, c7, c8, c9 and c10)
12345678910111213141516171819202122232425262728293031323334353637DEFPARAM CumulateOrders=FalseDEFPARAM NOCASHUPDATE = Falseonce n= 9once m= 3*n-1REM Comprar/Comprare/Acheter/BuymyTenkan=(highest[n](high)+lowest[n](low))/2myKijun=(highest[m](high)+lowest[m](low))/2myspanA=(myTenkan+myKijun)/2mySpanB=(highest[2*m](high)+lowest[2*m](low))/2c1 = (Close > myTenkan)c2 = (Close > myKijun)c3 = (Close > mySpanA)c4 = (Close > mySpanB)c5 = (Close > Close[26])IF c1 and c2 and c3 and c4 and c5 THENBUY 1 contract AT MARKETENDIFcoste = tradepriceREM Vender/Vendere/Vendre/Sellif (coste > myKijun) thenmyStop = myTenkanelsif (coste < myKijun) and (coste > mySpanB) thenmyStop = myKijunelsif (coste < mySpanB) thenmyStop = mySpanBendifIF close < myStop or Williams[14](close) < -80 or MACDline[12,26,9](close) < 0 THENsell at market//SELL AT myStop STOPENDIF04/06/2020 at 1:17 PM #12485404/06/2020 at 1:40 PM #12486204/06/2020 at 1:56 PM #12486504/06/2020 at 2:02 PM #12486804/06/2020 at 3:20 PM #124896Inavsan 3.0 (Inavsan expand to Short trades)1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162DEFPARAM CumulateOrders=FalseDEFPARAM NOCASHUPDATE = Falseonce n= 9once m= 3*n-1REM Comprar/Comprare/Acheter/BuymyTenkan=(highest[n](high)+lowest[n](low))/2myKijun=(highest[m](high)+lowest[m](low))/2myspanA=(myTenkan+myKijun)/2mySpanB=(highest[2*m](high)+lowest[2*m](low))/2c1 = (Close > myTenkan)c2 = (Close > myKijun)c3 = (Close > mySpanA)c4 = (Close > mySpanB)c5 = (Close > Close[26])c6 = Close < mytenkanc7 = close < myKijunc8 = close < mySpanAc9 = close < mySpanBc10= close < close[26]IF c1 and c2 and c3 and c4 and c5 THENBUY 1 contract AT MARKETENDIFcoste = tradepriceREM Vender/Vendere/Vendre/Sellif (coste > myKijun) thenmyStop = myTenkanelsif (coste < myKijun) and (coste > mySpanB) thenmyStop = myKijunelsif (coste < mySpanB) thenmyStop = mySpanBendifIF close < myStop or Williams[14](close) < -80 or MACDline[12,26,9](close) < 0 THENsell at market//SELL AT myStop STOPENDIFIf c6 and c7 and c8 and c9 and c10 thensellshort 1 contract at marketendif//Kost Verkoop is KVKV = Tradepriceif (KV < myKijun) thenmyStop = myTenkanelsif (KV > myKijun) and (KV < mySpanB) thenmyStop = myKijunelsif (KV > mySpanB) thenmyStop = mySpanBendifIF close < myStop or Williams[14](close) < -80 or MACDline[12,26,9](close) < 0 THENsell at market//SELL AT myStop STOPENDIF1 user thanked author for this post.
04/06/2020 at 4:40 PM #124902 -
AuthorPosts
Find exclusive trading pro-tools on