strategia con EMA200

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #236624 quote
    Aragorna
    Participant
    Junior

    Buongiorno a tutti, colgo l’occasione per chiedere un aiuto su delle righe di codice che non mi convincono del tutto come sono impostate:

    c1= close<Ema200

    c3= summation[100](c1)=100
    c4= close crosses over Ema200 and c3[1]
    c5= c2 and summation[5](c4)>=1 and (c4[1] or c5[1])
    c6= close crosses under Ema200 and c5[1]

    l’idea alla base è che il prezzo stia sotto l’EMA200 per un tot di candele (100 o + per l’esattezza), poi crossi in su l’EMA200 e ritorni giù in dopo essere stato massimo 5 candele sopra l’EMA 200.

    E’ corretto come è  impostato?

    grazie mille in anticipo a chi mi può aiutare

    Alessio

    #236632 quote
    robertogozzi
    Moderator
    Master

    Mi pare vadano bene, non vedo conflitti tra le varie ciondizioni. Ovviamente tutto dipende da come le usi.

    Se tu mettessi insieme una condizione tipo CLOSE CROSSES OVER EMA200 con una condizione tipo CLOSE < EMA200, è ovvio che non funzionerebbero in quanto confliggono.

    #236635 quote
    Aragorna
    Participant
    Junior

    grazie roberto,

    questa è la parte long invece.

    c7= summation[100](c2)=100
    c8= close crosses under Ema200 and c7[1]
    c9= c1 and summation[KK](c8)>=1 and (c8[1] or c9[1])
    c10= close crosses over Ema200 and c9[1]

    anche a me sembra a posto, il problema è che non entra sempre, per esempio ieri il sistema sarebbe dovuto entrare nel ticket MNQ ma non è entrato e non so perchè.ti allego foto

    sto impazzendo perchè non capisco cosa sbaglio

    #236652 quote
    robertogozzi
    Moderator
    Master

    Mi sono accorto adesso che stai facendo riferimento alla condizione che è sulla stessa riga, anche se l’accetta non so se ne uscirà mai un valore vero, in quanto una delle condizioni tra parentesi dove c’è OR, è la stessa a cui viene assegnato il vcalore stesso:

    .     c5= c2 and summation[5](c4)>=1 and (c4[1] or c5[1])

    .    c9= c1 and summation[KK](c8)>=1 and (c8[1] or c9[1])

    #236655 quote
    Aragorna
    Participant
    Junior

    hai idea di come possa riscrivere queste condizioni in modo corretto?

    #236661 quote
    robertogozzi
    Moderator
    Master

    Eccole:

    c5a= c2 and summation[5](c4)>=1
    c5 = c5a  and (c4[1] or c5a[1])
    
    c9a= c1 and summation[KK](c8)>=1
    c9 = c9a and (c8[1] or c9a[1])
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

strategia con EMA200


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Aragorna @aragorna Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by robertogozzi
1 year, 5 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 08/23/2024
Status: Active
Attachments: 1 files
Logo Logo
Loading...