entrare a mercato su tocco di una ema

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #190347 quote
    cimsalcimsal
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    cimsalcimsal
    Participant
    Junior

    grazie

    #201976 quote
    cimsalcimsal
    Participant
    Junior

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

    #201997 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    cimsalcimsal
    Participant
    Junior

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

    #202869 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
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

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 robertogozzirobertogozzi
3 years, 11 months ago.

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