Salidas con el ATR

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

    Hola comunidad, me podéis ayudar con esto:

    Como se escribe que si estamos largos en el mercado y el ATR(14) es menor que su medía de “x” periodos entonces que venda con el cruce a la baja del stocastico K con el estocástico D y si el ATR(14) periodos es mayor que su media de “x” periodos venda cuando el ATR(14) cruce a la baja la media “x”

    #244269 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Hola. Ahí va…
    1) ATR(14) es menor que su medía de “x” periodos entonces que venda con el cruce a la baja del stocastico K con el estocástico D

    atr=averagetruerange[14](close)
    avgatr=average[20](atr)
    stok=Stochastic[14,3](close)
    stoD=Stochasticd[14,3,5](close)
    
    if longonmarket and atr<avgatr and stok crosses under stoD then
    sell at market 
    endif

    2) si el ATR(14) periodos es mayor que su media de “x” periodos venda cuando el ATR(14) cruce a la baja la media “x”

    if longonmarket and atr crosses under avgatr then
    sell at market
    endif
    robertogozzi 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

Salidas con el 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 Iván GonzálezIván González
1 year, 7 months ago.

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