Condizione di verifica

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36965 quote
    Leonida1984
    Participant
    Average

    Buonasera a tutti, mi servirebbe un aiuto su una condizione di verifica.

     

    Pattern = close > close[1]
    
    if pattern then
    
    a=1
    
    else
    
    a=0
    
    endif
    
    if not onmarket and a=1 then
    
    buy 1 contract at market
    
    endif

     

    Il mio problema è il seguente, io dovrei testare sia a=1 che a=0 per evitare di dover ogni volta cambiare, è possibile farlo una sola volta. Ovvero trovare il modo che nello stesso becktest posso verificare sia la condizione a=1 che la condizione a=0

    Grazie infinite

    #37010 quote
    ALE
    Moderator
    Master

    Ciao

    se a= 1  allora close>close[1]

    se a= allora close=close[1] oppure close < close[1]

    Secondo me per testare entrambe le condizioni, bastera eliminare la condizione a

    in tal caso il sistema ti restituira tutti i ririsultati  sia se close>close1 condizione a, che close<close1 cle close=close1 condino a=0

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

Condizione di verifica


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Leonida1984 @bold1984 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by ALE
8 years, 8 months ago.

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