entrare a mercato su tocco di una ema

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #190347 quote
    cimsal
    Participant
    Junior

    scusi è possibile fare un programma che quando il prezzo tocca l’ema 25 và in buy o short a seconda che il super trend sia in rialzo o in ribasso? grazie

    #190494 quote
    robertogozzi
    Moderator
    Master

    Eccolo:

    DEFPARAM CumulateOrders = False
    ST    = Supertrend[3,10]
    Ema25 = average[25,1](close)
    Bull  = close > ST
    Bear  = close < ST
    IF Bull THEN
       IF low <= Ema25 AND close > Ema25 THEN
          BUY 1 Contract at Market
       ENDIF
    ELSIF Bear THEN
       IF high >= Ema25 AND close < Ema25 THEN
          SELLSHORT 1 Contract at Market
       ENDIF
    ENDIF
    #190503 quote
    cimsal
    Participant
    Junior

    grazie

    #201976 quote
    cimsal
    Participant
    Junior

    scusa si puo aggiungere uno stop quando cambia il super trend, grazie

    #201997 quote
    robertogozzi
    Moderator
    Master

    Eccolo (non l’ho provato):

    DEFPARAM CumulateOrders = False
    ST    = Supertrend[3,10]
    Ema25 = average[25,1](close)
    Bull  = close > ST
    Bear  = close < ST
    IF Bull THEN
       IF low <= Ema25 AND close > Ema25 THEN
          BUY 1 Contract at Market
       ENDIF
    ELSIF Bear THEN
       IF high >= Ema25 AND close < Ema25 THEN
          SELLSHORT 1 Contract at Market
       ENDIF
    ENDIF
    IF LongOnMarket AND Bear THEN
       SELL at market
    ELSIF ShortOnMarket AND Bull THEN
       EXITSHORT at market
    ENDIF
    #202867 quote
    cimsal
    Participant
    Junior

    scusami ma al cambio di super trend non va in stop, grazie

    #202869 quote
    robertogozzi
    Moderator
    Master

    A me funziona.

    Dimmi su quale strumento e timeframe l’hai provato ed indicami la data di entrata di una o due operazioni che poi non vengono fermate al cambio (ovviamente se cambi i parametri devi indicarmi quelli che hai usato tu per la prova).

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

entrare a mercato su tocco di una ema


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
cimsal @cimsal Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by robertogozzi
3 years, 5 months ago.

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