Heiken-Ashi

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #254400 quote
    JankarlJankarl
    Participant
    New

    Hola.

    Tengo un bot al que le quiero añadir la condición de comprar cuando una vela Heiken-Ashi cambia de color. Como seria esta condicion??.

    Muchas gracias

    #254402 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Aquí está, la variable Change es verdadera cuando ha habido un cambio de color:

    once xOpen = open
    xClose     = (open + close + high + low) / 4
    if barindex > 0 then
        xOpen  = (xOpen[1] + xClose[1]) / 2
    endif
    xBullish   = xClose > xOpen
    xBearish   = xClose < xOpen
    Change     = (xBullish AND xBearish[1]) OR  (xBullish[1] AND xBearish)
    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

Heiken-Ashi


ProOrder: Trading Automático y Backtesting

New Reply
Author
author-avatar
Jankarl @jankarl Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
9 months, 3 weeks ago.

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