RSI-EMA EurUsd M15
Forums › ProRealTime English forum › ProOrder support › RSI-EMA EurUsd M15
- This topic has 79 replies, 14 voices, and was last updated 1 year ago by fifi743.
-
-
07/05/2021 at 4:02 PM #17317807/05/2021 at 9:35 PM #173205
Did you change the time setting?
I don´t get how to change the time setting unfortunately…
IF Time >= h1 AND Time <= h2 THEN
Shouldn´t there be h1 = 010000 somewhere for example?07/05/2021 at 9:59 PM #17320607/05/2021 at 10:47 PM #17320707/06/2021 at 7:51 AM #17321207/06/2021 at 10:45 AM #17322707/06/2021 at 11:49 AM #17323207/06/2021 at 5:59 PM #17323907/06/2021 at 8:02 PM #17325007/06/2021 at 8:31 PM #173257Possibility of over-optimizitaion is always omnipresent. I always finish my backtests 3 or 4 months before the current date. And then I check if the algo works under non-optimized conditions.
07/06/2021 at 10:18 PM #173262From the performance data and the small drawdown, I would prefer my V2 from post # 173131. Over 200000bars great, but over 1000000bars not so good. In terms of durability, the original version and the version by Yet are arguably the best.
08/18/2021 at 11:34 PM #175654With a few modifications this potentially works quite well on the US Crude market also. My PRT/IG only has price data as far back as February 2020 however so not sure how well it does in a longer backtest.
(Edit – Times in the code are London time)
US Crude M15123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596//-------------------------------------------------------------------------// Hauptcode : #KISS RSI5 US Crude M15//Spread = 2.8//-------------------------------------------------------------------------DEFPARAM CumulateOrders = falsedefparam preloadbars = 2000Nlong = 1Nshort = 1MAXSHARES = abs(COUNTOFPOSITION) <= 1//EMA-TrendEMA1 = ExponentialAverage[60](close)EMA3 = ExponentialAverage[60](close)EMAlong = close > EMA3EMAshort = close < EMA3steigunglong = EMA1 > EMA1[1]steigungshort = EMA1 < EMA1[1]myATR = AverageTrueRange[50](close)//RSI5-EingangmyRSI = RSI[5](close)rsilong = (myRSI[1] > 35) and (myRSI < 35)rsishort = (myRSI[1] < 70) and (myRSI > 70)rsilongraus = myRSI > 80rsishortraus = myRSI < 15IF Time >= 000000 AND Time <= 210000 THENIF rsilong and EMAlong and steigunglong and MAXSHARES THENBUY Nlong shares at marketSET STOP LOSS myATR*7Set target profit myATR*7ENDIFIF rsishort and EMAshort and steigungshort and MAXSHARES THENsellshort Nshort shares at marketSET STOP LOSS myATR*8Set target profit myATR*8ENDIFendifif longonmarket and rsilongraus thensell at marketendifif shortonmarket and rsishortraus thenexitshort at marketendifif time = 210000 and dayofweek = 5 thensell at marketEXITSHORT at marketendif//************************************************************************//trailing stop functiontrailingstartL = 30 // trailing will start @trailinstart points profittrailingstartS = 35 // trailing will start @trailinstart points profittrailingstepL = 5 // trailing step to move the "stoploss"trailingstepS = 5 // trailing step to move the "stoploss"//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-tradeprice(1)>=trailingstartL*pipsize THENnewSL = tradeprice(1)+trailingstepL*pipsizeENDIF//next movesIF newSL>0 AND close-newSL>=trailingstepL*pipsize THENnewSL = newSL+trailingstepL*pipsizeENDIFENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND tradeprice(1)-close>=trailingstartS*pipsize THENnewSL = tradeprice(1)-trailingstepS*pipsizeENDIF//next movesIF newSL>0 AND newSL-close>=trailingstepS*pipsize THENnewSL = newSL-trailingstepS*pipsizeENDIFENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF08/18/2021 at 11:50 PM #17565608/19/2021 at 12:09 AM #17565708/19/2021 at 12:34 AM #175659 -
AuthorPosts
Find exclusive trading pro-tools on