Buongiorno,
grazie in anticipo a chi vorrà aiutarmi
Come si potrebbe scrivere un codice per una strategia del genere basata su acquisti in tre mesi specifici ? :
il 1-07 compra 1 contratto
il 1-08 compra un contratto
il 1-09 compra un contratto
il 30-10 vendi tutto
Grazie 1000
HARY
Eccolo (l’ho provato sul Dax, Giornaliero):
DEFPARAM CumulateOrders = True
Mesi = (Month = 7) OR (Month = 8) OR (Month = 9)
Giorno = (Day >= 1) AND (Day[1] > Day)
IF Mesi AND Giorno THEN
BUY 1 Contract at Market
ENDIF
IF (((Month = 10) AND (Day >= 29)) OR (Month > 11)) AND LongOnMarket THEN
SELL at Market
ENDIF
Grazie infinite Sig. Roberto
Scusami, nella riga 7, sostituisci Month > 11 con:
Month > 10