Francesco78

CAC 40 strategy with reversal-signal-threelinebreak indicator

Category: Strategies By: Francesco78 Created: June 25, 2017, 12:23 PM
June 25, 2017, 12:23 PM
Strategies
7 Comments
CAC 40 strategy with reversal-signal-threelinebreak indicator

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.

Download
Filename: cac40_wf.png
Downloads: 400
Download
Filename: cac40_daily_dynamic_tgt.itf
Downloads: 693
Download
Filename: PRC_RevertSignal_cac.itf
Downloads: 603
Francesco78
Francesco78 Master
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

fatlung
7 years ago
#

Hi Francesco May I know the time zone applicable to this strategy?

Francesco78
9 years ago
#

Hi CKW, yes I do run it live, and so far I had no problem, which kind of errors?

JohnScher
8 years ago
#

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

CKW
CKW
9 years ago
#

Hi Francesco, Do you running this strategy on Demo/Live or never version? Mine stopped due to errors. thanks.

Stenozar
9 years ago
#

OK Francesco, thanks

Stenozar
9 years ago
#

Hi Francesco, thanks for your code. May I have your email? I'd like to send you a message.

 

Francesco78
9 years ago
#

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

ProRealCode ProRealCode
Loading...