salida con ATR

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #243836 quote
    josemijosemi
    Participant
    Average

    Hola comunidad, me podéis ayudar con lo siguiente: no sé escribir en mi estrategia para salir de la posición con ATRs..

    #243851 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    He aquí un ejemplo:

    Sma20 = average[20,0](close)
    Atr   = AverageTrueRange[14](close)
    AtrMA = Average[100,0](Atr)
    // Entry
    IF close CROSSES OVER Sma20 AND Not OnMarket THEN
       BUY AT highest[3](high) STOP
    ELSIF close CROSSES UNDER Sma20 AND Not OnMarket THEN
       SELLSHORT AT lowest[3](low) STOP
    ENDIF
    //
    // Exit on ATR crossing under its average
    IF OnMarket AND (Atr CROSSES UNDER AtrMA) THEN
       SELL      AT MARKET
       EXITSHORT AT MARKET
    ENDIF
    // TP & SL
    set stop   %loss   0.3
    set target %profit 0.6
    GraHal and Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

salida con ATR


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
josemi @josemi Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
1 year, 7 months ago.

Topic Details
Forum: ProOrder: Trading Automático y Backtesting
Language: Spanish
Started: 02/14/2025
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...