Codicio per acquisti multiday

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #182966 quote
    Exidor
    Participant
    New

    Salve, vorrei sapere se sia possibile creare un codice che imponga l’acquisto di tot. azioni in multiday, es: acquista n. x di azioni  alfa , ogni giorno alla chiusura, o intraday , da quando l’ rsi si trova sotto il valore di 30 finche’ non arrivi a toccare il valore di 70, e a tale punto, che venda tutti gli acquisti, Grazie

    #182970 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    If Time = 172500 and Rsi[14](close) < 30 then
       Buy 1 contract at Market
    Endif
    If LongOnMarket and Rsi[14](close) >= 70 then
       Sell at Market
    Endif
    #183829 quote
    Exidor
    Participant
    New

    Salve

    Ho testato questo sistema, pero’ mi acquista solamente una volta, da quando l’RSI e’ sotto i 30. Vorrei facesse acquisti consecutivi giornalieri, uno dopo l’altro fintanto che l’RSI non raggiunge quota 70, x poi vendere il tutto. Si puo’ fare ?

    Grazie

    #183841 quote
    robertogozzi
    Moderator
    Master

    Prova questa modifica:

    If Time = 172500 and (((Rsi[14](close) < 30) and (abs(Countofposition) = 0)) or ((Rsi[14](close) < 70) and (abs(Countofposition) > 0))) then
       Buy 1 contract at Market
    Endif
    If LongOnMarket and Rsi[14](close) >= 70 then
       Sell at Market
    Endif
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Codicio per acquisti multiday


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Exidor @exidor Participant
Summary

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

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