Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

79
Views
en javascript quiero crear una función simple de unas pocas líneas para obtener Heikin-Ashi desde cerrado alto bajo abierto

Esta pregunta es sobre javascript (no pyhton o pine script).

Solo quiero crear una función simple de unas pocas líneas => "convertir" DESDE apertura regular, alta, baja y cierre de un intercambio A un Heikin Ashi

las variables open, high, low, close son de una API de intercambio que devuelve una matriz con velas regulares

aquí la fórmula

 ha_open = (last_ha_open - last_ha_close) / 2; ha_close = (open + high + low + close)/4; ha_high = max(high, ha_open, ha_close); ha_low = min(low, ha_open, ha_close);

donde me quedo "atascado" es "last_ha_open" y "last_ha_close"

**** es fácil guardar ha_open y ha_close con .push en una matriz

**** es fácil recuperarlos con array[(array.length -1)] (último de array)

**** ahí es donde se complica... : el bucle infinito de calcular el primero de la cadena... si está mal, los valores no coinciden...

¿Hay una forma javascript de hacer esto?

Notas que pude encontrar sobre Heikin-ashi

 Obs: The first Heikin-Ashi close equals the average of the open, high, low and close ((O+H+L+C)/4). The first Heikin-Ashi open equals the average of the open and close ((O+C)/2). The first Heikin-Ashi high equals the high and the first Heikin-Ashi low equals the low.
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!