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
//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.
You must be logged in to post a comment.
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 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
Hi Francesco May I know the time zone applicable to this strategy?