creazione del codice andare long il venerdì nel caso in cui la candela del giove

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42817 quote
    Fabio81
    Participant
    Average

    Ciao a tutti

    vorrei scrivere il codice che mi permetta di andare long il venerdì nel caso in cui la candela del giovedì sia rossa, e andare short il lunedì se la candela del venerdì è stata verde.

    Non essendo un gran programmatore ho difficolta , se qualcuno è in grado di aiutarmi grazie.

    #43231 quote
    robertogozzi
    Moderator
    Master

    Questo dovrebbe andare, io l’ho provato su Eur/Usd DAILY:

    Defparam cumulateorders = false                      //Solo un'operazione max. aperta.
    //                   Long
    IF CurrentDayOfWeek = 4 AND close < open THEN        //Il Giovedì si testa la candela per aprire
       Buy 1 contract at market                          //un'eventuale operazione il Venerdì.
    ENDIF
    //                   Short
    IF CurrentDayOfWeek = 0 AND close[1] > open[1] THEN  //La Domenica si testa la candela del Venerdì
       sellshort 1 contract at market                    //per un'eventuale operazione da aprire il Lunedì.
    ENDIF
    //GRAPH CurrentDayOfWeek AS "cDoW"
    //             Stop e target in pips
    SET TARGET pPROFIT 75
    SET STOP   pLOSS   35

    L’istruzione GRAPH serve solo per il debugging, è ininfluente per la strategia.

    #44141 quote
    Fabio81
    Participant
    Average

    ti ringrazio Roberto ,al momento non posso provare ma appena possibile ci lavoro sopra ,grazie ancora.

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

creazione del codice andare long il venerdì nel caso in cui la candela del giove


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Fabio81 @fabio81 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Fabio81
8 years, 5 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 08/09/2017
Status: Active
Attachments: No files
Logo Logo
Loading...