Acquisto dopo pattern

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #238474 quote
    tatankayotanka
    Participant
    Senior

    Buongiorno cosa devo mettere per far in modo che l acquisto avvenga il giorno dopo l avvenuta creazione del pattern TWS solo se il prezzo di apertura, del giorno dopo  è maggiore del prezzo di chiusura del pattern ? grazie a chi mi risponderà

    #238483 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    Body=close-open
    TWS=(body[2]>0 and body[1]>0 and body>0 and high[1]>high[2] and high>high[1] and close[1]>close[2] and close>close[1] and open[1]>open[2] and open[1]<close[2] and open>open[1] and open<close[1])
    //
    IF TWS THEN
       Chiusura = close
    ENDIF
    // Condizioni per entrare su posizioni long
    C1 = TWS[1] AND (open > Chiusura) AND Not OnMarket
    IF c1  THEN
       BUY 1000 CASH AT MARKET TOMORROWOPEN
    ENDIF
    // Stop e target
    SET STOP %LOSS 5
    SET TARGET %PROFIT 10

    ho aggiunto un TARGET per fare le prove.

    Iván González thanked this post
    #238677 quote
    tatankayotanka
    Participant
    Senior

    Grazie mille poi lo testo

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

Acquisto dopo pattern


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by tatankayotanka
1 year, 4 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 10/03/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...