Una entrata all’ora

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #191385 quote
    elfuego77
    Participant
    Junior

    Buonasera, avrei bisogno della seguente correzione. Il sistemino imposta le regole su 1h per entrare poi sul minuto. Nel modo in cui l’ho scritto io entra ripetutamente al verificarsi delle condizioni io vorrei invece fargli fare una sola operazione all’ora. Come devo integrare? Grazie.

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = false // Posizioni cumulate disattivate
    DEFPARAM FLATBEFORE = 075900
    DEFPARAM FLATAFTER = 215900
    // Impedisce al sistema di tradare in giorni specifici della settimana
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    //OpenDayOfWeek = 1 OR OpenDayOfWeek = 2 OR OpenDayOfWeek = 3 OR OpenDayOfWeek = 4 OR OpenDayOfWeek = 5
    
    
    timeframe (1h)
    vola=averagetruerange [5] (close)
    
    long=close[1]+(vola[1]*0.125)
    short=close[1]-(vola[1]*0.125)
    target0=close[1]
    vv=vola[1]*0.25
    
    
    timeframe (1 mn)
    
    c1 = close>long+5
    c2 = close<short-5
    
    if not onmarket and c1 then
    sellshort 10 contract at long stop
    endif
    if not onmarket and c2 then
    buy 10 contract at short stop
    endif
    
    
    
    
    SET STOP ploss 10
    SET TARGET pPROFIT 20
    
    #191392 quote
    robertogozzi
    Moderator
    Master

    Allora perché non entri semplicemente su 1 ora, se vuoi fare una sola operazione oraria. Usare più time frame per poi cercare di limitare il time frame più piccolo è possibile, ma inutile.

    Togli ogni riferimento ai vari time frame ed usa solo quello orario sul grafico.

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

Una entrata all’ora


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
elfuego77 @elfuego77 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
3 years, 10 months ago.

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