errore sistema di trading
Forums › ProRealTime forum Italiano › Supporto ProOrder › errore sistema di trading
- This topic has 3 replies, 2 voices, and was last updated 2 years ago by robertogozzi.
-
-
03/12/2022 at 11:35 AM #189863
buon giorno,
ieri ho provato a far girare questo nuovo sistema che sfrutta l’indicatore perfect trend v2 di nicolas, tuttavia una volta montato rigettava gli ordini dicendo che era impostato un numero massimo delle posizioni =0 e quindi stoppava il sistema.
allego il sistema se qualcuno riuscisse a capire l’errore ne sarei grato.
stefanodax 5 minuti123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144//dax 5 minutiDEFPARAM CUMULATEORDERS =FALSEDEFPARAM FLATBEFORE=060000DEFPARAM FLATAFTER=220000once contratto=1ONCE signal=0ONCE START=0//indicatori e variabili//perfect trend v2 by @nicolasmyfastline, myslowline, mytrend = CALL "PRC_PerfectTrendLine 2"[7, 3]//indicatoriema200=ExponentialAverage[200](close)iadx=ADX[20]myadx=ADXR[20]adxtrend= iadx>iadx[1] and myadx>myadx[1]adxnontrend= iadx<iadx[1]and myadx<myadx[1]STOK= Stochastic[20,3](close)STOKLONG=STOK<75STOKSHORT=STOK>15MYSTOK= Average[10](STOK)MYSTOKLONG= MYSTOK<60MYSTOKSHORT=MYSTOK>30MYSTOKKELONG= STOK>MYSTOKMYSTOKKESHORT=STOK<MYSTOK//condizioni dell'indicatore perfect trend ingressoif close>myslowline and close> myfastline thenSTART=1elsif close<myfastline and close <myslowline thenSTART=2ENDIF// 4 condizioni di entryif close> ema200 and START=1 THENIF close >DonchianChannelUp[10]and adxtrend AND MYSTOKLONG AND STOKLONG AND MYSTOKKELONG thensignal=1ELSeSIGNAL=0endifENDIFif close< ema200 and START =2 THENIF close<DonchianChannelDown[10] and adxtrend AND MYSTOKSHORT AND STOKSHORT AND MYSTOKKESHORT thensignal=-1ELSESIGNAL=0endifENDIFif close> ema200 and start=2 thenIF close<DonchianChannelDown[10] and adxnontrend AND MYSTOKSHORT AND STOKSHORT AND MYSTOKKESHORT thensignal=-2ELSESIGNAL=0endifENDIFif close< ema200 and start=1 thenIF close >DonchianChannelUp[10]and adxnontrend AND MYSTOKLONG AND STOKLONG AND MYSTOKKELONG thensignal=2ELSeSIGNAL=0endifENDIF//apertura delle posizioniIF NOT ONMARKET AND SIGNAL=1 THENTRADE=1ENTRY=CLOSEMINIMO= (DonchianChannelDown[10])STOPPE= ABS(ENTRY-MINIMO)*pipsizeTARGETTE= STOPPEBUY contratto CONTRACT AT MARKETENDIFIF NOT ONMARKET AND SIGNAL=2 THENTRADE=2ENTRY=CLOSEMINIMO= ROUND (DonchianChannelDown[10])STOPPE= ABS(ENTRY-MINIMO)*pipsizeTARGETTE= STOPPEBUY contratto CONTRACT AT MARKETENDIFIF NOT ONMARKET AND SIGNAL=-1 THENTRADE=-1ENTRY=CLOSEMASSIMO= ROUND (DonchianChannelUP[10])STOPPE= ABS(ENTRY- MASSIMO)*pipsizeTARGETTE= STOPPESELLSHORT contratto CONTRACT AT MARKETENDIFIF NOT ONMARKET AND SIGNAL=-2 THENTRADE=-2ENTRYS=CLOSEMASSIMO= ROUND (DonchianChannelUP[10])STOPPE= ABS(entrys-massimo)*pipsizeTARGETTE= STOPPESELLSHORT contratto CONTRACT AT MARKETENDIFSET STOP LOSS STOPPESET TARGET PROFIT TARGETTE// nicolas MFE trailing stoptrailingstop = 20//resetting variables when no trades are on marketif not onmarket thenMAXPRICE = 0MINPRICE = closepriceexit = 0endif//case SHORT orderif shortonmarket thenMINPRICE = MIN(MINPRICE,close) //saving the MFE of the current tradeif tradeprice(1)-MINPRICE>=trailingstop*pointsize then //if the MFE is higher than the trailingstop thenpriceexit = MINPRICE+trailingstop*pointsize //set the exit price at the MFE + trailing stop price levelendifendif//case LONG orderif longonmarket thenMAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current tradeif MAXPRICE-tradeprice(1)>=trailingstop*pointsize then //if the MFE is higher than the trailingstop thenpriceexit = MAXPRICE-trailingstop*pointsize //set the exit price at the MFE - trailing stop price levelendifendif//exit on trailing stop price levelsif onmarket and priceexit>0 thenEXITSHORT AT priceexit STOPSELL AT priceexit STOPendif03/12/2022 at 12:08 PM #18987203/12/2022 at 12:16 PM #18987303/15/2022 at 11:02 AM #190008L’ho meso in demo, sia come l’hai scritto tu, sia senza CALL (integrando l’indicatore nella strategia stessa). Mi ha aperto varie posizioni, nei due giorni in demo, senza nessun errore.
Non saprei darti una spiegazione.
Succede anche a me, tutti i giorni, da circa 6-8 mesi. Non sono riuscito a capire perché.
-
AuthorPosts
Find exclusive trading pro-tools on