3 Trade all’anno

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #205224 quote
    Hary Trading
    Participant
    New

    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

    #205254 quote
    robertogozzi
    Moderator
    Master

    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
    #205300 quote
    Hary Trading
    Participant
    New

    Grazie infinite Sig. Roberto

    #205315 quote
    robertogozzi
    Moderator
    Master

    Scusami, nella riga 7, sostituisci Month > 11 con:

    Month > 10
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

3 Trade all’anno


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Hary Trading @adtrader Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
3 years, 3 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 12/03/2022
Status: Active
Attachments: No files
Logo Logo
Loading...