Discussing the strategy VECTORIAL DAX (M5)
Forums › ProRealTime English forum › ProOrder support › Discussing the strategy VECTORIAL DAX (M5)
- This topic has 1,260 replies, 124 voices, and was last updated 2 weeks ago by Greger2346.
-
-
07/26/2019 at 8:44 PM #103581
Hi,
the latest stable version in which I can insert my MM to make backtest is the V 5.0 for both dax and us100 ? Thank you
07/27/2019 at 5:22 AM #10358707/27/2019 at 12:48 PM #103605ok thanks,
but in order to to make my money management work that I need to change?
12345678910/ [pc] position criteria (also set a limit to the number of trades a day) (set all high for no impact)// is influenced by which reset criteria is usedif resetcounter thenpclong = countoflongshares < 2 and longtradecounter < 100 and tradecounter < 3pcshort = countofshortshares < 2 and shorttradecounter < 100 and tradecounter < 3elsepclong = countoflongshares < 1 and longtradecounter < 100 and tradecounter < 100pcshort = countofshortshares < 1 and shorttradecounter < 100 and tradecounter < 100endif// has influence on Money Management07/27/2019 at 3:31 PM #10361807/28/2019 at 11:47 AM #103648I insert my MM and set resetcounter=0 and my MM don’t run. The same problem with the version 5.0 on dax. The version 4.2 on dax run very well on my MM. Can you solve the problema. Attach v 5.0 of US100 with my MM. (the same problem in v. 5.0 on dax). Tanks
07/28/2019 at 7:04 PM #10366908/06/2019 at 12:43 PM #104268I’ve changed few settings to adapt the strategie with 1 minute timeframe.
Can anyone show me the backtest with premium PRT? (spread:1, timeframe:1min, market:dax)
Thank you
DAX-1m, vectorial123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282//-------------------------------------------------------------------------// Code principal : DAX, 1min, Vectorial V4.2//-------------------------------------------------------------------------// ROBOT VECTORIAL DAX v4.2p// M5// SPREAD = 1// by BALMORA 74 - APRIL 2019DEFPARAM CumulateOrders = falseDEFPARAM Preloadbars = 50000once enablesl = 1 // stoplossonce enablept = 0 // profit targetonce enablets = 1 // trailing stop// when set display to 1, uncomment graphonprice to have affect visually (comment out graphonprice for trading)once displaysl = 1 // stop lossonce displaypt = 1 // profit targetonce displayts = 1 // trailing stoponce usetimecriteria = 1 // [1] included extra timeschedules not to tradeonce holiday = 1 // [1] prevent trading on a german public holidayonce positionweekend = 1 // [1]=keep weekend position then ignore times belowonce fridaylastentry = 174500once fridayclosetime = 225500 // close on last candle on friday to prevent gaps over weekendsl = 1.5 // % stoplosspt = 2 // % profit target// reset at startif intradaybarindex= 0 thentradeday = 1endifif (not onmarket or ((longonmarket and shortonmarket[1]) or (longonmarket[1] and shortonmarket))) thenlongtradecounter= 0shorttradecounter = 0tradecounter=0endif// [pc] position criteria (also set a limit to the number of trades a day) (or set high for no impact)// tradecounter means taking x trades a day max (long / short combined)// with moneymanagement; set all to 100 to have no effect on moneymanagement// without moneymangement; i.e. max 1 trade a day set all values to 1pclong = countoflongshares < 3 and longtradecounter < 10 and tradecounter < 5pcshort= countofshortshares < 3 and shorttradecounter < 10 and tradecounter < 5// Money ManagementLotti = 1// Money Management End// used for sl/pt/ (not used for ts)underlaying=100// not to be optimized !// underlaying security / index / forex// profittargets and stoploss have to match the lines// 0.01 forex [i.e. gbpusd=0.01]// 1.00 securities [i.e. aapl=1 ;// 100.00 indexes [i.e. dax=100]// 100=xauusd// 100=cl us crudeif holiday then// prevent trading first week in a new yearif year=2015 and month=1 and day<=4 thentradeday = 0elsif year=2016 and month=1 and day<=3 thentradeday = 0elsif year=2017 and month=1 and day<=8 thentradeday = 0elsif year=2018 and month=1 and day<=7 thentradeday = 0elsif year=2019 and month=1 and day<=6 thentradeday = 0// prevent trading yearly common holiday'selsif month=12 and day=25 then // Christmas Daytradeday = 0elsif month=12 and day=26 then // Christmas Daytradeday = 0// prevent trading on a public holiday in germany; market can be openelsif year=2019 and month=4 and day=19 then // holiday in germany; Good Fridaytradeday = 0elsif year=2018 and month=3 and day=30 then // holiday in germany; Good Fridaytradeday = 0elsif year=2017 and month=4 and day=14 then // holiday in germany; Good Fridaytradeday = 0elsif year=2019 and month=4 and day=22 then // holiday in germany; Easter Mondaytradeday = 0elsif year=2018 and month=4 and day=2 then // holiday in germany; Easter Mondaytradeday = 0elsif year=2017 and month=4 and day=17 then // holiday in germany; Easter Mondaytradeday = 0elsif month=5 and day=1 then // holiday in germany; Labour Daytradeday = 0elsif year=2019 and month=5 and day=30 then // holiday in germany; Ascension Daytradeday = 0elsif year=2018 and month=5 and day=10 then // holiday in germany; Ascension Daytradeday = 0elsif year=2017 and month=5 and day=25 then // holiday in germany; Ascension Daytradeday = 0elsif year=2019 and month=6 and day=10 then // holiday in germany; Whit Mondaytradeday = 0elsif year=2018 and month=6 and day=21 then // holiday in germany; Whit Mondaytradeday = 0elsif year=2017 and month=6 and day=5 then // holiday in germany; Whit Mondaytradeday = 0elsif month=10 and day=3 then // holiday in germany; Unity Daytradeday = 0//elsetradeday = 1endifendif//TRADING TIMEtradetime = time >= 095500 and time < 174500//tradetime = time >= 160000 and time < 214500if usetimecriteria thennotradetime=(time>=113000 AND time<120000) OR (time>=133000 and time<160000)//notradetime = 0notradetime=not notradetimeelsenotradetime=tradetimeendif//STRATEGYONCE PeriodeA = 10ONCE nbChandelierA= 15ONCE PeriodeB = 20ONCE nbChandelierB= 35ONCE lag = 0.5MMA = Exponentialaverage[PeriodeA](close)ADJASUROPPO = (MMA-MMA[nbchandelierA]*pipsize) / nbChandelierAANGLE = (ATAN(ADJASUROPPO))MMB = Exponentialaverage[PeriodeB](close)pente = (MMB-MMB[nbchandelierB]*pipsize) / nbchandelierBtrigger = Exponentialaverage[PeriodeB+lag](pente)//BUY CONDITIONSCondBuy1 = ANGLE >= 30CondBuy2 = (pente > trigger) AND (pente < 0)CondBuy3 = average[100](close) > average[100](close)[1]CONDBUY = CondBuy1 and CondBuy2 and CondBuy3//SHORT CONDITIONSCondSell1 = ANGLE <= - 30CondSell2 = (pente CROSSES UNDER trigger) AND (pente > -1)CondSell3 = average[10](close) < average[10](close)[1]CONDSELL = CondSell1 and CondSell2 and CondSell3//POSITION LONGUEif tradetime thenIF positionweekend and TRADEDAY THENIF pclong and CONDBUY and notradetime THENbuy lotti contract at marketlongtradecounter=longtradecounter + 1tradecounter=tradecounter+1ENDIF//POSITION COURTEIF pcshort and CONDSELL and notradetime THENSellshort lotti contract at marketshorttradecounter=shorttradecounter + 1tradecounter=tradecounter+1ENDIFelsif positionweekend=0 and TRADEDAY THENif currentdayofweek<=4 or (currentdayofweek=5 and time<fridaylastentry) thenIF pclong and CONDBUY and notradetime THENbuy lotti contract at marketlongtradecounter=longtradecounter + 1tradecounter=tradecounter+1ENDIF//POSITION COURTEIF pcshort and CONDSELL and notradetime THENSellshort lotti contract at marketshorttradecounter=shorttradecounter + 1tradecounter=tradecounter+1ENDIFendifendifendif//TRAILING STOPONCE trailingstoplong = 4 // Trailing Stop Atr Relative DistanceONCE trailingstopshort = 4 // Trailing Stop Atr Relative DistanceONCE atrtrailingperiod = 14 // Atr parameter ValueONCE minstop = 0 // Minimum Trailing Stop Distance//----------------------------------------------atrtrail = AverageTrueRange[atrtrailingperiod]((close/10)*pipsize)/1000trailingstartl = round(atrtrail*trailingstoplong)trailingstartS = round(atrtrail*trailingstopshort)if enablets = 1 THENTGL =trailingstartlTGS=trailingstartsif not onmarket or ((longonmarket and shortonmarket[1]) or (longonmarket[1] and shortonmarket)) thenMAXPRICE = 0MINPRICE = closePREZZOUSCITA = 0ENDIFif longonmarket thenMAXPRICE = MAX(MAXPRICE,close)if MAXPRICE-tradeprice(1)>=TGL*pointsize thenif MAXPRICE-tradeprice(1)>=MINSTOP thenPREZZOUSCITA = MAXPRICE-TGL*pointsizeELSEPREZZOUSCITA = MAXPRICE - MINSTOP*pointsizeENDIFENDIFENDIFif shortonmarket thenMINPRICE = MIN(MINPRICE,close)if tradeprice(1)-MINPRICE>=TGS*pointsize thenif tradeprice(1)-MINPRICE>=MINSTOP thenPREZZOUSCITA = MINPRICE+TGS*pointsizeELSEPREZZOUSCITA = MINPRICE + MINSTOP*pointsizeENDIFENDIFENDIFif onmarket and PREZZOUSCITA>0 thenEXITSHORT AT PREZZOUSCITA STOPSELL AT PREZZOUSCITA STOPENDIFif displayts then//graphonprice PREZZOUSCITA coloured(0,0,255,255) as "trailingstop"endifENDIF// set stoplossif enablesl thenif not onmarket thensloss=0elsif longonmarket thensloss=tradeprice(1)-((tradeprice(1)*sl)/underlaying)*pointsizeelsif shortonmarket thensloss=tradeprice(1)+((tradeprice(1)*sl)/underlaying)*pointsizeendifSET STOP %LOSS slif displaysl then//graphonprice sloss coloured(255,0,0,255) as "stoploss"sloss=slossendifendif// to display profittargetif enablept thenif not onmarket thenptarget=0elsif longonmarket thenptarget=tradeprice(1)+((tradeprice(1)*pt)/underlaying)*pointsizeelsif shortonmarket thenptarget=tradeprice(1)-((tradeprice(1)*pt)/underlaying)*pointsizeendifSET TARGET %PROFIT ptif displaypt then//graphonprice ptarget coloured(121,141,35,255) as "profittarget"ptarget=ptargetendifendif// close position on fridayif positionweekend=0 thenif onmarket thenif currentdayofweek=5 and time=fridayclosetime thensell at marketexitshort at marketendifendifendif//pp=(positionperf*100)//graph pp08/06/2019 at 4:53 PM #10428908/12/2019 at 11:58 AM #104603hi everybody
This morning, started “Vetorial DAX V5.0” upon my live account.
parameters :
12345678910111213141516171819202122232425262728once tradeschedule = 0 //[0]=full; [1]=morning; [2]=lunch; [3]=afternoononce resetcounter = 1 //[0]=default; [1]=experiment (both connected by position criteria)once enablesl = 1 // stoplossonce enablept = 0 // profit targetonce enablets = 1 // trailing stoponce enablebb = 0 // bollingerband exit (add bb as indicator to have it visually) (all can be combined)// when set display to 1, uncomment graphonprice to have affect visually (comment out graphonprice for trading)once displaysl = 0 // stop lossonce displaypt = 0 // profit targetonce displayts = 0 // trailing stoponce usetimecriteria = 1 // [1] included extra timeschedules not to tradeonce holiday = 1 // [1] prevent trading on a german public holidayonce positionweekend = 1 // [1]=keep weekend position then ignore time belowonce fridayclosetime = 225500 // close on last candle on friday to prevent gaps over weekendonce fridaylastentry = 174500once closeonweekendprofit = 1 // close position in profit before weekend (to lower risk of gaps against position)once closeonholidayprofit = 0 // close position in profit on a holidaysl = 2 // % stoplosspt = 1 // % profit targetpositionsize=0.5I’ll let you know about performance, about each week.
regards
vince
08/16/2019 at 6:26 PM #10488708/17/2019 at 3:21 PM #10493508/17/2019 at 3:55 PM #10493608/17/2019 at 4:24 PM #10494108/17/2019 at 4:29 PM #10494308/18/2019 at 10:25 PM #105035auto trading does work with position size = 0.5 (DAX 30, at least)
-
AuthorPosts
Find exclusive trading pro-tools on