sospendere il ts su notizie , poi riattivarlo

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #202625 quote
    romanelli4romanelli4
    Participant
    Average

    Buonasera,

    onde provare ad evitare gli spike sulle notizie

    vorrei testare su i miei ts la seguente variabile:

    if longonmarket esci alle 142900 e rientra alle 143100.

    Come si può codificare??

    Grazie mille

    Max

    #202712 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo (non l’ho provato):

    ONCE Flag = 0
    IF Not OnMarket AND Flag > 0 AND Time = 143100 THEN
       BUY Flag CONTRACTS AT MARKET
       Flag = 0
    ENDIF
    IF LongOnMarket AND time = 142900 THEN
       Flag = abs(CountOfPosition)
       SELL AT Market
    ENDIF

    Dove hai l’istruzione BUY, subito sotto scrivi:

    Flag = 0

    come ho fatto io sopra.

    #202798 quote
    romanelli4romanelli4
    Participant
    Average

    Salve Roberto,

    sembra funzionare,

    e la versione short come la scriveresti?

    Grazie mille

    max

    #202862 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccoli insieme:

    ONCE FlagL = 0
    IF Not OnMarket AND FlagL > 0 AND Time = 143100 THEN
       BUY FlagL CONTRACTS AT MARKET
       FlagL = 0
    ENDIF
    IF LongOnMarket AND time = 142900 THEN
       FlagL = abs(CountOfPosition)
       SELL AT Market
    ENDIF
    //
    ONCE FlagS = 0
    IF Not OnMarket AND FlagS > 0 AND Time = 143100 THEN
       SELLSHORT FlagS CONTRACTS AT MARKET
       FlagS = 0
    ENDIF
    IF ShortOnMarket AND time = 142900 THEN
       FlagS = abs(CountOfPosition)
       EXITSHORT AT Market
    ENDIF

    Dove hai l’istruzione BUY, subito sotto scrivi:

    FlagL = 0

    Dove hai l’istruzione SELLSHORT, subito sotto scrivi:

    FlagS = 0
    #202863 quote
    romanelli4romanelli4
    Participant
    Average

    Grazie mille Roberto,

    Top!!

Viewing 5 posts - 1 through 5 (of 5 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

sospendere il ts su notizie , poi riattivarlo


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
romanelli4 @romanelli4 Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by romanelli4romanelli4
3 years, 11 months ago.

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