demo test since April 22. no loss on CAC40.
On 3 trades only Bertrand 😉 But it’s a beginning …
Hi Guys,
Don’t know if someone mentioned it but there is an error in the code
For me it’s not
//VECTEUR = CALCUL DE LA PENTE ET SA MOYENNE MOBILE
MMB = Exponentialaverage[PeriodeB](close)
pente = (MMB-MMB[nbchandelierB]*pipsize) / nbchandelierB
trigger = Exponentialaverage[PeriodeB+lag](pente)
But
MMA = exponentialaverage[PeriodeA](customclose)
ADJASUROPPO = ((MMA-MMA[nbchandelierA])/pipsize) / nbChandelierA
ANGLE = (ATAN(ADJASUROPPO))
trigger = exponentialaverage[PeriodeA+lag](ANGLE)
Because in the first code the code is always positive and not positive/negative depends on the angle
Have a nice day
Zilliq
PaulParticipant
Master
hi zilliq
can you post some results or code using your change?
Thanks
I had assumed he meant only to redefine ‘trigger’
//STRATEGIE
//VECTEUR = CALCUL DE L'ANGLE
ONCE PeriodeA = 10
ONCE nbChandelierA= 14
MMA = Exponentialaverage[PeriodeA](customclose)
ADJASUROPPO = (MMA-MMA[nbchandelierA]*pipsize) / nbChandelierA
ANGLE = (ATAN(ADJASUROPPO)) //FONCTION ARC TANGENTE
CondBuy1 = ANGLE >= 45
CondSell1 = ANGLE <= - 34
//VECTEUR = CALCUL DE LA PENTE ET SA MOYENNE MOBILE
ONCE PeriodeB = 22
ONCE nbChandelierB= 34
lag = 4
MMB = Exponentialaverage[PeriodeB](close)
pente = (MMB-MMB[nbchandelierB]*pipsize) / nbchandelierB
trigger = exponentialaverage[PeriodeA+lag](ANGLE)
but the results are dire. Something else then?
First, the code in the actual vectorial dax code was
//VECTEUR = CALCUL DE LA PENTE ET SA MOYENNE MOBILE
ONCE PeriodeB = 22
ONCE nbChandelierB= 34
lag = 4
MMB = Exponentialaverage[PeriodeB](close)
pente = (MMB-MMB[nbchandelierB]*pipsize) / nbchandelierB
trigger = Exponentialaverage[PeriodeB+lag](pente)
// modifier par fifi743
// ajout d'un filtre pour achat
filtre,weekpivot,pivot,filt =call"FILTRE_Prise_Position"(close)
//===================== ajouter par fifi743
donchianP = 20
hh=highest[donchianP](high)
ll=lowest[donchianP](low)
MA=Average[4](close)
Myrsi=RSI[2](close)
CondBuy2 = (pente > trigger) AND (pente < 0) and high>MA and coeff>0.9
CondSell2 = (pente CROSSES UNDER trigger) AND (pente > -1)
If you use the actual vectorial dax code you can NEVER have a negative pente and so you can NEVER have a CondBuy2 and the pente is ALWAYS>-1
PeriodeB = 22
nbChandelierB= 34
lag = 4
MMB = Exponentialaverage[PeriodeB](close)
pente = (MMB-MMB[nbchandelierB]*pipsize) / nbchandelierB
Return pente
And now if you correct the code, you have positive/negative pente and Good Condbuy
PeriodeB = 22
nbChandelierB= 34
lag = 4
MMB = Exponentialaverage[PeriodeB](close)
pente = ((MMB-MMB[nbchandelierB])/pipsize) / nbchandelierB
Return pente
So the correction it’s just the “/” in the pente calculation?
PaulParticipant
Master
Thanks zilliq for the explaining.
I tested your conclusion
pente is ALWAYS>-1
so I checked with this
if pente<=-1 then
test=1
else
test=0
endif
graph test
and got the result in the pic
I’am taking another look with your modification.
Hi Paul, use the actual code not the correction and as you see on my picture (the blue) the pente is always positive and it’s normal because of the code
With the actual “mistake” code
PeriodeB = 22
nbChandelierB= 34
lag = 4
MMB = Exponentialaverage[PeriodeB](close)
pente = (MMB-MMB[nbchandelierB]*pipsize) / nbchandelierB
if pente<=-1 then
test=1
else
test=0
endif
return test
Always 0 = mistake
PaulParticipant
Master
I cannot reach the same conclusion, even as indicator on the dax 5min timeframe. Maybe have a look at my latest version. I will release it in the next post.
HI @paul
Take the actual code
PeriodeB = 22
nbChandelierB= 34
lag = 4
MMB = Exponentialaverage[PeriodeB](close)
pente = (MMB-MMB[nbchandelierB]*pipsize) / nbchandelierB
And you will see you can’t have negative value as pipsize is on MMB[nbchandelierB] and not (MMB-MMB[nbchandelierB])
See U