gabri

Directional Index (DI) strategy

Category: Strategies By: gabri Created: November 9, 2017, 8:41 AM
November 9, 2017, 8:41 AM
Strategies
2 Comments
Directional Index (DI) strategy

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

Download
Filename: PRT-DI-strat.itf
Downloads: 295
gabri
gabri Master
Code artist, my biography is a blank page waiting to be scripted. Imagine a bio so awesome it hasn't been coded yet.
Author’s Profile

Comments

gabri
9 years ago
#

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.

edocasa
9 years ago
#

CIAO , SCUSA SE TI CONTATTO,VOLEVO SAPERE SE SEI UN PROGRAMMATORE,NELCASO SE SARESTI DISPONIBILE A VEDERE UN CODICE CHE E' STATO REALIZZATO MA DA MODIFICARE GRAZIE

ProRealCode ProRealCode
Loading...