This is a strategy based on the Directional Index (DI) indicator created by Welles Wilder and modified by me at this link. It’s a “all-time-in” strategy in which you reverse your position when the signal is triggered. The trigger is based on the variations of DI index. You can also make it a long-only strategy by eliminating the short entry lines.
I strongly suggest to use this strategy with high CSI or, in case you are not a good friend of volatility, with a high ADXR.
I have never used real world this system but on the stock market, with no spread and 5 Euros of commissions seems to be pretty good.
Blue skies!!
// Definizione dei parametri del codice
DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
// Condizioni per entrare su posizioni long
ignored, ignored, mioDI, ignored, ignored, ignored = CALL "PRT - ADX e DI"[14, 2, 25]
if (mioDI[3]>mioDI[2]) and (mioDI[2]<mioDI[1]) and (mioDI>mioDI[2]) then
golong=1
goshort=0
endif
if (mioDI[3]<mioDI[2]) and (mioDI[2]>mioDI[1]) and (mioDI<mioDI[2]) then
goshort=1
golong=0
endif
if golong=1 and close>average[x](close) then
buy 3000 cash at high stop
endif
if goshort=1 and close<average[x](close)then
sellshort 3000 cash at low stop
endif
Non sono un genio ma so fare qualcosa. Posso provare ad aiutarti ma se e' troppo complicato non so cosa posso fare. Questa piattaforma ha qualche limite nella programmazione.