ALEModerator
Master
Ciao
sto cercando di far funzionare una strategia su questo indicatore: PRC_FractalsZigZag, ma non capisco perché gli ordini vengono eseguiti in nel modo scorretto.
Allego entrambi i file:
Bozza strategia : TRADING_ON_PRC_FractalsZigZag
Indicatore : PRC_FractalsZigZag
Grazie
Ale
Qual è esattamente il problema?
Si prega di tenere presente che i frattali sono disegnati in seguito e, in passato, non ho letto il tuo codice, ma sarebbe un indizio per il vostro problema ..
ALEModerator
Master
Ciao Nicolas
problema risolto..
Grazie
Ale
Ciao, ho ottimizzato un pò per il Dax Cash 30m di IG magari può interessare.
ALEModerator
Master
Ciao
grazie altares, lo guardo volentieri, ti faccio sapere
grazie
ALEModerator
Master
Ciao
grazie altares, lo guardo volentieri, ti faccio sapere
grazie
ALEModerator
Master
Non e male, pero cosi non si potrebbe usare, bisogna migliorarlo, appena ho un po di tempo ti darei una mano
Grazie
Ale
Si è una bozza perchè sto lavorando su altri che ho ideato io, ma perchè dici che non si potrebbe usarE?
Non e male, pero cosi non si potrebbe usare, bisogna migliorarlo, appena ho un po di tempo ti darei una manoGrazie
Ale
Ciao Ale, anche io sto cercando da ieri di fare un trading system per la strategia Zigzag ma senza molti risultati.. Tu riusciresti a darmi una mano? Ti ringrazio!
ci siete riusciti?
anche a me interessa un trading system sul DAX
ci siete riusciti?
anche a me interessa un trading system sul DAX
ce ne sono miliardi sul forum, cmq ho modificato quello dell’epoca per renderlo più sensato, ma provalo in demo e poi andrebbero fatte altre modifiche
//Dax 30min Cfd 1€
defparam cumulateorders = false
timeon= time > 0 and time < 160000
CP=61
//cp = 20
if high[cp] >= highest[2*cp+1](high) then
LH = 1
else
LH = 0
endif
if low[cp] <= lowest[2*cp+1](low) then
LL = -1
else
LL = 0
endif
if LH = 1 then
TOPy = high[cp]
//TOPx = barindex[cp]
endif
if LL = -1 then
BOTy = low[cp]
//BOTx = barindex[cp]
endif
a=LH>0
B=LL<0
// Condizioni per entrare su posizioni long
mom=momentum[7]
long= (a and timeon) and (mom<75)
short= b and timeon and (mom>-65)
IF NOT LongOnMarket AND long THEN
BUY 1 CONTRACTS AT topy-80*pipsize limit//MARKET
ENDIF
// Condizioni per entrare su posizioni short
IF NOT ShortOnMarket AND short THEN
SELLSHORT 1 CONTRACTS AT boty+65/pipsize limit// MARKET
ENDIF
set stop ploss 80
set target profit 70
if time > 220000 then
sell at market
exitshort at market
endif
//************************************************************************
//trailing stop function
trailingstart = 40 //trailing will start @trailinstart points profit
trailingstep = 5 //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)>=trailingstart*pipsize THEN
newSL = tradeprice(1)+trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
newSL = newSL+trailingstep*pipsize
ENDIF
ENDIF
//manage short positions
IF SHORTONMARKET THEN
//first move (breakeven)
IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
newSL = tradeprice(1)-trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
newSL = newSL-trailingstep*pipsize
ENDIF
ENDIF
//stop order to exit the positions
IF newSL>0 THEN
SELL AT newSL STOP
EXITSHORT AT newSL STOP
ENDIF
//************************************************************************