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 months ago by Greger2346.
-
-
11/21/2019 at 8:35 AM #113273
You are not in the same time zone as Grahal…
If you change your time zone or the code you will get the same result
If you are on CET+1 you can change to:
123//VARIABLESCtimeA = time >= 090000 and time <= 190000CtimeB = time >= 090000 and time <= 19000011/21/2019 at 5:43 PM #113341Probably a really obvious solution here – but any idea why my IG CFD Demo account is rejecting orders for ‘Wall Street Cash (£1)’ using the code below.I get the message: Rejected:Size below minimum requirement.Position size = 1123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125//————————————————————————-// Main code : Vectorial DJI 3M v6.0 +entFilt//————————————————————————-//————————————————————————-// Main code : Vectorial DJI 3M v6.0//————————————————————————-//————————————————————————-// Main code : _Vectorial Dax V3//————————————————————————-// ROBOT VECTORIAL DAX// M5// SPREAD 1.5// by BALMORA 74 – FEBRUARY 2019DEFPARAM CumulateOrders = falseDEFPARAM Preloadbars = 50000T1 = 6p1 = average[t1](close)p2 = average[t1*2](close)p3 = average[t1*6](close)p4 = average[t1*3](close)a1 = p1 > p2 and p2 > p3 and p3 > p4a2 = p1 < p2 and p2 < p3 and p3 < p4//VARIABLESCtimeA = time >= 080000 and time <= 180000CtimeB = time >= 080000 and time <= 180000// TAILLE DES POSITIONSPositionSizeLong = 1PositionSizeShort = 1//STRATEGIE//VECTEUR = CALCUL DE L’ANGLEONCE PeriodeA = 10ONCE nbChandelierA= 15MMA = Exponentialaverage[PeriodeA](close)ADJASUROPPO = (MMA–MMA[nbchandelierA]*pipsize) / nbChandelierAANGLE = (ATAN(ADJASUROPPO)) //FONCTION ARC TANGENTECondBuy1 = ANGLE >= 35CondSell1 = ANGLE <= – 40//VECTEUR = CALCUL DE LA PENTE ET SA MOYENNE MOBILEONCE PeriodeB = 20ONCE nbChandelierB= 35lag = 1.5MMB = Exponentialaverage[PeriodeB](close)pente = (MMB–MMB[nbchandelierB]*pipsize) / nbchandelierBtrigger = Exponentialaverage[PeriodeB+lag](pente)CondBuy2 = (pente > trigger) AND (pente < 0)CondSell2 = (pente CROSSES UNDER trigger) AND (pente > –1)//ENTREES EN POSITIONCONDBUY = CondBuy1 and CondBuy2 and CTimeACONDSELL = CondSell1 and CondSell2 and CtimeB//POSITION LONGUEIF CONDBUY and A1 THENbuy PositionSizeLong contract at market//SET Target %PROFIT 1//SET STOP %LOSS 0.7ENDIF//POSITION COURTEIF CONDSELL and a2 THENSellshort PositionSizeShort contract at market//SET Target %PROFIT 1.2//SET STOP %LOSS 1ENDIF//VARIABLES STOP SUIVEURONCE trailingStopType = 1 // Trailing Stop – 0 OFF, 1 ONONCE trailingstoplong = 9 // Trailing Stop Atr Relative DistanceONCE trailingstopshort = 8 // Trailing Stop Atr Relative DistanceONCE atrtrailingperiod = 14 // Atr parameter ValueONCE minstop = 0 // Minimum Trailing Stop Distance// TRAILINGSTOP//———————————————-atrtrail = AverageTrueRange[atrtrailingperiod]((close/10)*pipsize)/1000trailingstartl = round(atrtrail*trailingstoplong)trailingstartS = round(atrtrail*trailingstopshort)if trailingStopType = 1 THENTGL =trailingstartlTGS=trailingstartsif not onmarket 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 STOPENDIFENDIF11/21/2019 at 9:39 PM #11336611/21/2019 at 10:21 PM #113369On CFD the min position size is 2 x Wall Street Cash (£1) or 1 x Wall Street Cash (£2)?
Thanks for this. I can see Wall Street Cash £1 – which I can set the position size to 2.
I cant see the £2 option in the list – should I be using $2 option?
11/21/2019 at 10:23 PM #113370On CFD the min position size is 2 x Wall Street Cash (£1) or 1 x Wall Street Cash (£2)?
That’s interesting as I’m sure when I last checked the minimum size on DJI for spread betting was 0.2
It used to be a minimum size of 1 but soon after the ESMA changes that meant you needed 5 times as much margin IG divided the minimum size by 5. I haven’t checked it for a while so perhaps I should.
11/21/2019 at 10:41 PM #113374the minimum size on DJI for spread betting was 0.2
It may well be (or 0.5?), but my comment was about CFD position size.
11/21/2019 at 10:48 PM #113375I cant see the £2 option in the list – should I be using $2 option?
I meant $2 anyway 🙂 … which I can see you have got.
I find it easier to use the $2 contract and then if I swap a System from SB to CFD then a position size = 1 (already coded in the strategy) works fine on a $2 contract (with no changes needed).
1 user thanked author for this post.
11/25/2019 at 5:40 AM #11352511/25/2019 at 9:19 AM #11353211/26/2019 at 3:57 AM #11360511/27/2019 at 6:35 AM #11369011/27/2019 at 8:35 AM #113694Hello @sublime06. You can publish the itf file that you managed to do?
1 user thanked author for this post.
11/27/2019 at 8:48 AM #113695thank you, I found without your help VONASI
As a moderator I am tasked to keep the forums tidy and point out to forum members when they are breaking forum rules. If you’d posted in English in the English speaking forum rather than posting in French then your chances of me being able to assist with your question would be far higher. I’m pleased for you that you found your solution without me having to use a translation tool unnecessarily.
11/28/2019 at 6:14 PM #113871Good afternoon.
It is the first time I write here and I wanted to talk about the possible over-optimization of the DAX 6.2 Vector proposed by Fifi.I wanted to know if it is possible to make another optimization different from the one proposed by Fifi.
The first thing I did was to unify the “Filtre_Prise_Position” indicator with the Vectorial Dax system.
Then I estimated that the main system variables are PeriodeA, PeriodeB, ChandelierA, ChandelierB, AngleA and AngleB.
What I am doing is optimizing month by month and getting the best results for each month.
With that data you can do several things:
– An arithmetic average with 15 periods or more.
– Its weighted calculation as if it were an Exponential Average to give more weight to the last months
– A weighted calculation relative to the amount of money earned each month
– Calculation of arithmetic averages between maximum benefit and maximum% success.
– more ….
The options to estimate the optimal values without falling into over optimization are many and all of them are giving positive values.Regarding the bad results obtained this month by the system proposed by Fifi with its values, I think it is something transitory. All estimates with variables of all types give a drop in this last month.
And in part it is logical because seeing the code we see the great importance of the “Weekpoints” as points of support and resistance that indicate the exits of the operations. Let’s note that this month the DAX was atypically very flat, which makes the system fail.I still think the system is good, very good.
It takes me one day to get maximum optimization for each month and I am doing it a second time because I detected a failure in my procedure.
When I have all the values obtained again, I will share them here.Many thanks to those who collaborated in this system and in this forum, especially Balmora, Fifi, GraHal, Gubben …
3 users thanked author for this post.
11/28/2019 at 7:23 PM #113874Edurecio – thank you for your contribution to this topic but please only post in one language (the language of the forum that you are posting in) otherwise threads become very large if every possible language is catered for.
The platform has a built in translation tool that others can use if they feel the need.
-
AuthorPosts
Find exclusive trading pro-tools on