Filter for Trigger on specific moment of the market

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #253141 quote
    roccafragiusroccafragius
    Participant
    Average

    Buongiorno a tutti, vorrei un consiglio su come evitare di avere entrate automatiche in situazioni di mercato confuse. Ho provato a codificare la grandezza media di una candela, magari prendendo come riferimento solo le candele dalle 14 alle 18 per il Nasdaq in modo che siano significative, ed avitare le entrate quando le candele sono troppo grandi o hanno wick troppo estese ( sia magari rispetto al body che rispetto alla media delel candele). Purtroppo non sono riuscito a costruire un filtro efficace che mi elimini SOLO le entrate che mi avrebbero generato perdite, in quanto applicando tale filtro vengono rimosse anche entrate con grossi gain con il mercato che parte a razzo (ad esempio il segnale in basso, la freccia blu). Arrivo alla domanda, quale è secondo voi l’approccio per tenere l’entrata in basso e non fare quella in alto?   Grazie!!!

    Entrata.jpg Entrata.jpg
    #253147 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Seguendo un pò le tue indicazioni ho provato a fare questo:

    ONCE Numero    = 0
    ONCE TimeStart = 140000
    OrarioTrading  = (OpenTime >= TimeStart) AND (OpenTime <= 180000)
    IF OrarioTrading THEN
       IF (OpenTime = TimeStart) OR ((OpenTime > TimeStart) AND (OpenTime[1] < TimeStart)) OR ((OpenTime > TimeStart) AND (OpenTime[1] > TimeStart) AND (OpenDay <> OpenDay[1])) THEN
          Numero   = 0
          myRange  = 0
          myBody   = 0
          HIwick   = 0
          LOwick   = 0
       ENDIF
       Numero  = Numero + 1
       myRange = (myRange + range)
       xRange  = myRange / Numero
       myBody  = (myBody + abs(open - close))
       xBody   = myBody / Numero
       HIwick  = HIwick + (high - max(open,close))
       xHIwick = HIwick / Numero
       LOwick  = LOwick + (min(open,close) - low)
       xLOwick = LOwick / Numero
    ENDIF
    UpperWick         = high - max(open,close)
    LowerWick         = min(open,close) - low
    myLongConditions1 = (close > average[100,0](close)) AND Not OnMarket   //prezzo > Sma100
    myLongConditions2 = (range < xRange) AND (abs(open - close) < xBody) //range e body < alle loro medie ore 14-18
    myLongConditions3 = (UpperWick + LowerWick) < (xHIwick + xLOwick)        //ombre < alla loro media ore 14-18
    myLongConditions  = myLongConditions1 AND myLongConditions2 AND myLongConditions3
    IF myLongConditions THEN
       BUY 1 Contract at Market
       SET STOP   pLOSS   50
       SET TARGET pPROFIT 50
    ENDIF

    verifica se c’è qualcosa di buono, probabilmente andrà migliorato.

    Iván González thanked this post
    #253204 quote
    roccafragiusroccafragius
    Participant
    Average

    Grazie mille Roberto!!

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

Filter for Trigger on specific moment of the market


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by roccafragiusroccafragius
10 months, 3 weeks ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 10/30/2025
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...