strategia su ticksize

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #104736 quote
    iceman89iceman89
    Participant
    Average

    Volevo sapere come mai non funziona la mia strategia allego.

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    // Si modificano solo i Giorni, gli orari e la Deal Size(contratti,lotti Fx e Azioni)
    // Impedisce al sistema di creare nuovi ordini per entrare a mercato o aumentare la taglia della posizione prima dell’orario specificato
    timeEnterBefore = time >= noEntryBeforeTime
    
    // Impedisce al sistema di piazzare nuovi ordini per entrare a mercato o aumentare la taglia della posizione dopo l’orario indicato
    noEntryAfterTime = 225958
    timeEnterAfter = time <= noEntryAfterTime
    
    // Impedisce al sistema di tradare in giorni specifici della settimana
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    //Condizioni per ENTRARE e USCIRE “LONG” (BUY TO SELL)
    //Formula Per Buy, positionprice(midprice) e ticksize (spread) inteso da prorealtime come variabili di sistema.
    B = POSITIONPRICE < (Low + TICKSIZE)
    //Numero Contratti, azioni e lotti FX
    N = 1
    IF NOT LONGONMARKET and timeEnterBefore and timeEnterAfter and daysForbiddenEntry and B then
    BUY N CONTRACTS AT MARKET NextBarOpen
    ELSIF LONGONMARKET then
    SELL AT MARKET
    ENDIF
    
    //Condizioni per ENTRARE e USCIRE “SHORT” (SELLSHORT TO EXITSHORT || SELL TO BUY)
    //Formula Per Sell
    S = POSITIONPRICE > (High – TICKSIZE)
    //Numero Contratti, azioni e lotti FX
    N = 1
    IF NOT SHORTONMARKET and timeEnterBefore and timeEnterAfter and daysForbiddenEntry and S then
    SELLSHORT N CONTRACTS AT MARKET NextBarOpen
    ELSIF SHORTONMARKET then
    EXITSHORT AT MARKET
    ENDIF
    #104737 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Per favore utilizza il pulsante “insert code PRT” quando devi inserire del codice nel tuo post, per renderlo più chiaro e leggibile, come ho appena fatto io.

    Grazie.

    #104738 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Non funziona cosa significa, non apre nessuna operazione, ti segnala qualche errore?

    Perché usi TICKSIZE?

    Cosa intendi fare quando lo sommi o lo togli da un prezzo (high o low)?

    #104739 quote
    iceman89iceman89
    Participant
    Average

    Volevo fare uan cosa del genere

    SELL

    Positionprice (midprice per PRT)  > high – Ticksize(variazione più piccola di prezzo)

     

    BUy

    Positionprice (midprice perPRT) < low + Ticksize (variazione più piccola di prezzo)

    non va nel senso che non riesco ad inserire anche gli orari e i giorni in cui tradare  in cui deve entrare a mercato (at market- strategia aggressiva) esempio inizo orario dalle 00:00:00 e fine alle 22:59:58 altrimenti si subiscono i costi overnight; e anche i giorni dal lunedì al venerdì.

    Poi io uso IG MARKETs non vorrei che dipendesse anche dal numero di contratti o lotti  o azioni troppo basso o per come lo conteggia PRT perchè qunado lo lancio in pro order senza specificar ei giorni e gli orarri va a a markets però mi da sempre 0 Euro e non si sposta neanche di un centesimo in profitto, ovviamente sto parlando di timeframe bassi da 1 secondo in su.

    non capisco proprio l errore, e poi queste sono le variabili del sistema di PRT.

    grazie mille in anticipo a chiunque risponda.

    #104740 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Non hai definito la variabile noEntryBeforeTime, prova se è questo il problema.

    #104741 quote
    iceman89iceman89
    Participant
    Average

    il problena è come metterle in sequenza in pro order.

    #104743 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Non so bene cosa vuoi fare alle righe 16 e 27, ad ogni modo la riga 16 è SEMPRE vera, perché POSITIONPRICE è 0 ed è quindi inferiore a LOW, mentre la riga 27 è sempre falsa, per il motivo opposto, ovverosia è 0 e non potrà MAI essere > HIGH!

    Quindi, dopo avere aggiunto la variabile noEntryBeforeTime (non ti segnalava che mancava quella variabile?), fa operazioni, ma solo long.

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

strategia su ticksize


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
iceman89 @iceman89 Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
7 years, 1 month ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 08/14/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...