BACKTEST SU BIAS ORARIO

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

    Buonasera,

    prima di tutto ringrazio chi vorrà aiutarmi

    Avrei necessità di scrivere un codice che, su grafico h1 faccia il seguente test:

    Si entra long alle 10:00 e si esce alle 15:00

    Avrei necessità anche, per cortesia, della seguente alternativa:

    Se dalle 00:00 alle 10:00 la sessione è stata negativa, entra long dalle 10:00 alle 15:00

    Grazie ancora

    Hari

    #203284 quote
    MauroPro
    Participant
    Veteran

    le due alternative sono uguali

    #203286 quote
    Hary Trading
    Participant
    New

    Ciao Mauro, grazie per la risposta ma non direi che sono uguali

    nella prima ipotesi vorrei interrogare il sistema su una entrata long dalle 10:00 alle 15:00

     

    nella seconda ipotesi, chiedo di sapere i risultati del long di cui sopra, solo se la sessione da 00:00 alle 10:00 è stata ribassista, filtrando di fatto il test; infatti questo secondo sistema entrerebbe long solo se dalle 00:00 alle 10:00 la sessione risultasse negativa

     

    Grazie

    #203287 quote
    MauroPro
    Participant
    Veteran

    Il primo:

    defParam cumulateOrders = false

    if not onMarket and time = 100000 then
    buy 1 contract at market
    endif

    if longOnMarket and time = 150000 then
    sell 1 contract at market
    endif

    #203288 quote
    MauroPro
    Participant
    Veteran

    il secondo:

    defParam cumulateOrders = false

    if time = 000000 then
    prezzo000000 = close
    endif
    if time = 100000 then
    prezzo100000 = close
    endif

    if not onMarket and prezzo100000 < prezzo000000 and time = 100000 then
    buy 1 contract at market
    endif

    if longOnMarket and time = 150000 then
    sell 1 contract at market
    endif

    #203293 quote
    Hary Trading
    Participant
    New

    Grazie infinite  Mauro

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

BACKTEST SU BIAS ORARIO


ProOrder: Trading Automatico & Backtesting

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

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

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