Not even your name!
Hey – if it makes a million then by all mean put my name on it. If not then I’ve got my name on enough of my own rubbish strategies and I really don’t need another one.
Better 🙂
Possibly over op.
// ROBOT VECTORIAL DAX v2
// M5
// SPREAD = 1
// by BALMORA 74 - APRIL 2019
DEFPARAM CumulateOrders = false
DEFPARAM Preloadbars = 50000
//TRADING TIME
CtimeA = time >= 150000 and time <= 220000
CtimeB = time >= 150000 and time <= 220000
//POSITION SIZE
PositionSize = 1
//STRATEGY
ONCE PeriodeA = 10
ONCE nbChandelierA= 15
ONCE PeriodeB = 20
ONCE nbChandelierB= 35
ONCE lag = 1.5
MMA = Exponentialaverage[PeriodeA](close)
ADJASUROPPO = (MMA-MMA[nbchandelierA]*pipsize) / nbChandelierA
ANGLE = (ATAN(ADJASUROPPO))
MMB = Exponentialaverage[PeriodeB](close)
pente = (MMB-MMB[nbchandelierB]*pipsize) / nbchandelierB
trigger = Exponentialaverage[PeriodeB+lag](pente)
//BUY CONDITIONS
CondBuy1 = ANGLE >= 4
CondBuy2 = (pente > trigger) AND (pente < 0)
CondBuy3 = average[100](close) > average[100](close)[1]
CONDBUY = CondBuy1 and CondBuy2 and CondBuy3 and CTimeA
//SHORT CONDITIONS
CondSell1 = ANGLE <= - 55
CondSell2 = (pente CROSSES UNDER trigger) AND (pente > -1)
CondSell3 = average[20](close) < average[20](close)[1]
CONDSELL = CondSell1 and CondSell2 and CondSell3 and CtimeB
//POSITION LONGUE
IF CONDBUY THEN
buy PositionSize contract at market
SET STOP %LOSS 2
ENDIF
//POSITION COURTE
IF CONDSELL THEN
Sellshort PositionSize contract at market
SET STOP %LOSS 2
ENDIF
//TRAILING STOP
ONCE trailingStopType = 1 // Trailing Stop - 0 OFF, 1 ON
ONCE trailingstoplong = 8 // Trailing Stop Atr Relative Distance
ONCE trailingstopshort = 5 // Trailing Stop Atr Relative Distance
ONCE atrtrailingperiod = 30 // Atr parameter Value
ONCE minstop = 0 // Minimum Trailing Stop Distance
// TRAILINGSTOP
//----------------------------------------------
atrtrail = AverageTrueRange[atrtrailingperiod]((close/10)*pipsize)/1000
trailingstartl = round(atrtrail*trailingstoplong)
trailingstartS = round(atrtrail*trailingstopshort)
if trailingStopType = 1 THEN
TGL =trailingstartl
TGS=trailingstarts
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
if MAXPRICE-tradeprice(1)>=MINSTOP then
PREZZOUSCITA = MAXPRICE-TGL*pointsize
ELSE
PREZZOUSCITA = MAXPRICE - MINSTOP*pointsize
ENDIF
ENDIF
ENDIF
if shortonmarket then
MINPRICE = MIN(MINPRICE,close)
if tradeprice(1)-MINPRICE>=TGS*pointsize then
if tradeprice(1)-MINPRICE>=MINSTOP then
PREZZOUSCITA = MINPRICE+TGS*pointsize
ELSE
PREZZOUSCITA = MINPRICE + MINSTOP*pointsize
ENDIF
ENDIF
ENDIF
if onmarket and PREZZOUSCITA>0 then
EXITSHORT AT PREZZOUSCITA STOP
SELL AT PREZZOUSCITA STOP
ENDIF
ENDIF
I post here the last version of the code :
Vectorial DAX v2 (WFE) //with Paul contribution
Vectorial US100 v2(WFE) // with bullbear contribution
I think it is also possible to have good results on CFD Wall Street (DJIA)
an optimisation does already exist on DJIA?
I started a Forward Test Log on the Thread link below.
The Vectorial strategy has lots of interest and good performance (thank you for sharing @Balmora74) so I decided to log my Forward Tests in this spreadsheet Forward Test – Sys Perf.
Feel free anybody to log your Forward Test performance as described in the link below.
Thanks for sharing your spreadsheet @Grahal.
I have questions :
- For the column “Average Gain per Trade” do you use the Vonasi code “Average Gain per 1” ?
- On the column Market we can see “DAX” but on your attachement pictures we can see the test on Wall Street (DFB) ?
- With timeframe M1 and not M5 ? In all my backtest it seems to works well in M5 and H4 for information…
Thanks.
I have questions :
Well spotted! It’s good to share cos others help to get it right! 🙂
- Yes I would always base my Av per trade on 1 Lot, but by checking the Orders tab, column Qty and do a calc in my head. I always only trade 1 lot on Fwd Test (unless market forces me to do otherwise) for equal comparison etc. So no I don’t use Vonasi code “Average Gain per 1” .
- My mistake, the Fwd Test was on DJI / Wall Street (I corrected the Log, thanks). I left your filename as DAX by mistake.
- Yes 1 min on DJI, but I also have 2 other versions running on 5 min on DAX, I will add the performance of these later.
Have discovered a strange thing
Run the code bullbear at US Tech 100 live.
Algo took position in Friday and had no SL in the beginning. During the evening I saw that it added SL
But, yesterday when I saw that the position is still active with SL is gone?
Why did algo remove SL during the weekend at the position.
@bullbear
I have the same problem on a other code. During the week end TAKE PROFIT and STOP LOSS have been removed ! This algo is running on my live /real account. So i have manage it manually and close it.
So the problem is not link to the strategy Vectorial US100 v2(WFE).
It’s a problem with the IG / PRT plateform. See that :
https://www.prorealcode.com/topic/strategies-stopped-due-to-rejected-orders-lack-of-info/page/4/
I think that the best thing is reporting the protblem at IG.
Thanks Balmora
I have to pay interest over the weekend, no major cost but it took away 15-20% of the profit.
Closed the pos now and started the algo live again.
I am going to report the problem to IG.
I’m a bit lot in the different versiosn. Is there any version on five minutes on DJIA or Cac for example ?
Is there any version on five minutes on DJIA or Cac for example ?
This was part of my reason for proposing that we enter performance on here
Forward Test – Sys Perf then we easily see what versions are being Forward Tested by readers of this Topic.
This is a good strategy, but there are so many versions it is not easy to see from reading the text / comments which versions have been superseded?
If anybody has a better idea for an easy way for us all to know which versions are good then I’d be all for it.
Thanks for the beautiful BALMORA code. I wanted to know why it doesn’t work on the euro dollar? It does not even carry out one operation. Do I need to change any settings? Thank you
It does not even carry out one operation.
Does the code use volume? There is no volume on Forex.
Or maybe there is *pipsize missing somewhere?
I might try it later on eurusd and see what I get and I’ll let you know.