salida con ATR

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #243836 quote
    josemi
    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
    robertogozzi
    Moderator
    Master

    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.

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 robertogozzi
1 year ago.

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