Here is a little strategy from me. Profitable over a full 200,000 bars in a small time unit. Unfortunately, the yield is not huge. But the interesting thing is that you can trade well with just a single filter for such a long time. Also works with a Bollinger entry and EMA60 as a filter.
Maybe someone has an idea how to get more yield out.
Unfortunately, I have not yet found any other currency pair that works consistently well in a similar manner.
Ideas and improvements are very welcome.
//-------------------------------------------------------------------------
// Hauptcode : #KISS RSI5 EurUsd M15
//Spread = 1
//-------------------------------------------------------------------------
DEFPARAM CumulateOrders = false
defparam preloadbars = 2000
Nlong = 1
Nshort = 1
MAXSHARES = abs(COUNTOFPOSITION) <= 1
//EMA-Trend
EMA1 = ExponentialAverage[45](close) //50
//EMA2 = ExponentialAverage[ma*1](close)//H1
EMA3 = ExponentialAverage[45](close) //60
EMAlong = close > EMA3
EMAshort = close < EMA3
steigunglong = EMA1 > EMA1[1]
steigungshort = EMA1 < EMA1[1]
myATR = AverageTrueRange[12](close)
//RSI5-Eingang
myRSI = RSI[5](close)
rsilong = (myRSI[1] > 30) and (myRSI < 30)
rsishort = (myRSI[1] < 70) and (myRSI > 70)
rsilongraus = myRSI > 75
rsishortraus = myRSI < 30
IF Time >= 010000 AND Time <= 230000 THEN
IF rsilong and EMAlong and steigunglong and MAXSHARES THEN //and emalongkurz
BUY Nlong shares at market
//SET STOP %LOSS 0.35 //120
//Set target %profit 0.975 //40
SET STOP LOSS myATR*6 //120
Set target profit myATR*7
ENDIF
IF rsishort and EMAshort and steigungshort and MAXSHARES THEN //and emashortkurz
sellshort Nshort shares at market //BollUp[1]limit
//SET STOP %LOSS 0.975 //130
//Set target %profit 0.9 //40
SET STOP LOSS myATR*10 //120
Set target profit myATR*9.25
ENDIF
endif
if longonmarket and rsilongraus then //c2
sell at market
endif
if shortonmarket and rsishortraus then //c1
exitshort at market
endif
//if time = 230000 then //and dayofweek = 5 then
//sell at market
//EXITSHORT at market
//endif
//************************************************************************
//trailing stop function
trailingstartL = 23 //30 15 trailing will start @trailinstart points profit
trailingstartS = 18 //30 15 trailing will start @trailinstart points profit
trailingstepL = 9 //2 1 trailing step to move the "stoploss"
trailingstepS = 2 //2 1 trailing step to move the "stoploss"
//reset the stoploss value
IF NOT ONMARKET THEN
newSL=0
ENDIF
//manage long positions
IF LONGONMARKET THEN
//first move (breakeven)
IF newSL=0 AND close-tradeprice(1)>=trailingstartL*pipsize THEN
newSL = tradeprice(1)+trailingstepL*pipsize
ENDIF
//next moves
IF newSL>0 AND close-newSL>=trailingstepL*pipsize THEN
newSL = newSL+trailingstepL*pipsize
ENDIF
ENDIF
//manage short positions
IF SHORTONMARKET THEN
//first move (breakeven)
IF newSL=0 AND tradeprice(1)-close>=trailingstartS*pipsize THEN
newSL = tradeprice(1)-trailingstepS*pipsize
ENDIF
//next moves
IF newSL>0 AND newSL-close>=trailingstepS*pipsize THEN
newSL = newSL-trailingstepS*pipsize
ENDIF
ENDIF
//stop order to exit the positions
IF newSL>0 THEN
SELL AT newSL STOP
EXITSHORT AT newSL STOP
ENDIF
Can one of the coders please help me? Unfortunately, my abilities are limited. If I understand correctly, my strategy here is a greatly simplified variant of the Vectorial DAX system. The trend is only given via the slope of an EMA. With WF in different variants, I always got EMA45 as a result. So I assume that it seems to be quite robust.
Can someone give me the code snipet with which I can calculate the slope directly? Or the angle of the slope? Or even incorporate it into my strategy? Many Thanks!
Thank you Roberto for pointing this out. I can now see how simple my code is. But maybe this simplicity also makes it so robust? 8 years in M15 and always a winner almost every quarter. I’ll try to work my way into the topic and maybe even tinker something.
Sehr einfach, aber profitabel über Jahre hinweg. Hast du einen Vorschlag für Verbesserungen? Ich habe festgestellt, je mehr Filter man verwendet, desto eher landet man bei Überoptimierung.
Very easy, but profitable for years. Do you have a suggestion for improvements? I’ve found that the more filters you use, the more likely you are to end up over-optimizing.
@phoentzs
Only post in the language of the forumthat you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
Thank you 🙂
Hello phoentzs,
Great strategy with potential of improvment^^.
You must be careful with spread that has a high impact on performance. Your strategy is running at night and spread can be higher.
Otherwise you have included a trailing stop but it doesn’t improve the performance and you can curve fit results.
In the strategy, the spread is: 1, since the spread is 0.9 at night and 0.6 during the day, the maximum risk is for positions over the weekend. In the backtest, however, weekend positions do not have a bad effect. The trailing stop is actually only an emergency solution for large movements. The strategy without a TP also works almost as well.
Hi
I’ve recommended it to viewers of my site, at the moment I have tried a couple of things, will attach the code for you to review
It seems hard to balance the increasing P/L with drawdowns, it feels like there’s another filter needed
I tried making it a day trading system but that didn’t work so maybe as an overnight scalping system?
https://robofuturestrader.com/kiss-eur-usd-system-on-prorealcode-to-pick-up/
Thank you for your interest. I’ll look at the code later. I tried a lot as a filter … EMA tandem, EMA triple, momentum … a rising / falling EMA had the best results. I still have a version with an EMA angle, similar to Vectorial DAX … but this version is only slightly better. I think the “secret” lies in this: you only take / get what the market gives you. The more trades you filter out, the bigger the drawdown will be later. Tonight I’ll have a look at your code.
EricParticipant
Master
Maybe change time filter to 22 instead of 23?
Long time since i traded forex but i remember the spread could be wide sometimes in the evening, dont remember exactly when but around 22-23?
Yes that’s right. From 23: 00-01: 00 the spread is around 5 … that’s why I took a break during this time.
EricParticipant
Master
Yes 2300 seems to the line in the sand
This another shop but i guess IG also do this?
https://www1.oanda.com/forex-trading/markets/recent