Hello everyone.
This is a strategy I found by playing around with the indicator posted by Nicolas
https://www.prorealcode.com/prorealtime-indicators/reversal-signal-threelinebreak/
I applied to cac 40 and I used in the counterintuitive way (buy with a sell signal / sell with a buy signal).
In line with what Andrea Ungher teaches on DAX I applied a condition on the “fullness” of the prevous day bar as a filter.
In order to make it work pls download also the indicator.
walk forward analysis is attached
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
//CAC 40 daily strategy spread 3 DEFPARAM CumulateOrders = False // Cumulating positions deactivated atr = averagetruerange[14] c = 0.5//parameter to define dojiness ///profit parameters for trailing dynamic target k = 1 //profit parameters for long j = 7 //profit parameters for shorts ///fulness definition if opendayofweek <>1 then fullness = abs(dopen(1)-dclose(1))/abs(dhigh(1)-dlow(1)) endif if opendayofweek = 1 then fullness = abs(dopen(2)-dclose(2))/abs(dhigh(2)-dlow(2)) endif ydayok = fullness<c // signal def trendsig = CALL "PRC_RevertSignal_cac" cl = trendsig=-1 cs = trendsig=1 IF cs and ydayok THEN sellshort 2 contract AT MARKET ENDIF IF cl and ydayok THEN buy 2 PERPOINT AT MARKET ENDIF //TRAILING STOP PFL = k*atr PFS = j*atr TGL =10 TGS=10 if not onmarket then MAXPRICE = 0 MINPRICE = close PREZZOUSCITA = 0 ENDIF if longonmarket then MAXPRICE = MAX(MAXPRICE,close) if MAXPRICE-tradeprice(1)>=TGL*pointsize then PREZZOUSCITA = MAXPRICE-TGL*pointsize ENDIF ENDIF if shortonmarket then MINPRICE = MIN(MINPRICE,close) if tradeprice(1)-MINPRICE>=TGS*pointsize then PREZZOUSCITA = MINPRICE+TGS*pointsize ENDIF ENDIF if onmarket and PREZZOUSCITA>0 then EXITSHORT AT PREZZOUSCITA STOP SELL AT PREZZOUSCITA STOP ENDIF if longonmarket then set target pprofit PFL endif if shortonmarket then set stop ploss PFS endif |
Have fun.
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hi Francesco, thanks for your code. May I have your email? I’d like to send you a message.
Hi Stenizar and thank you!
For the email, I think the rule of the forum is to ask Nicolas to share them. I have nothing against him giving your email. Let’s just wait for him to read this message
OK Francesco, thanks
Hi Francesco,
Do you running this strategy on Demo/Live or never version? Mine stopped due to errors.
thanks.
Hi CKW, yes I do run it live, and so far I had no problem, which kind of errors?
Hello Francesco.
Are you still active with the Threeliner?
I also follow that, that you get a good reversal signal there.
I have noticed that the further the range between lines is, the more often a rerversal occurs.
Can you convert the indicator so that I get the range?
I could imagine using the range and setting the stoploss to, say, 20% of the range and the take profit to 50% of the range.
Have you tried something like this or maybe seen from the corners of your eyes?
kind regards
JohnScher
Hi Francesco
May I know the time zone applicable to this strategy?