Gekko Forum
Heikin Ashi - Printable Version

+- Gekko Forum (https://forum.gekko.wizb.it)
+-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html)
+--- Forum: Guides (https://forum.gekko.wizb.it/forum-22.html)
+--- Thread: Heikin Ashi (/thread-1539.html)



Heikin Ashi - fo0man - 02-23-2018

I found Gekko a few days ago and have been trying out some different strategies. One of the things I was experimenting with is Heikin Ashi candles so. For anyone wanting to use HA candles here's how I'm doing it.


Code:
var _ = require('lodash');

var strat = {
...

  heikenAshi: function(candle) {
    return {
      close: (candle.open + candle.close + candle.high + candle.low) / 4,
      open: (this.previousCandle.open + this.previousCandle.close) / 2,
      high: _.max([candle.high, candle.open, candle.close]),
      low: _.min([candle.low, candle.open, candle.close])
    };
  },

  update: function () {
    if (this.previousCandle) {
      this.heikenCandle = this.heikenAshi(this.candle);
    }

    this.previousCandle = this.candle;
  },

...
}



RE: Heikin Ashi - korani - 03-14-2018

(02-23-2018, 11:42 PM)fo0man Wrote: I found Gekko a few days ago and have been trying out some different strategies. One of the things I was experimenting with is Heikin Ashi candles so. For anyone wanting to use HA candles here's how I'm doing it.


Code:
var _ = require('lodash');

var strat = {
...

  heikenAshi: function(candle) {
    return {
      close: (candle.open + candle.close + candle.high + candle.low) / 4,
      open: (this.previousCandle.open + this.previousCandle.close) / 2,
      high: _.max([candle.high, candle.open, candle.close]),
      low: _.min([candle.low, candle.open, candle.close])
    };
  },

  update: function () {
    if (this.previousCandle) {
      this.heikenCandle = this.heikenAshi(this.candle);
    }

    this.previousCandle = this.candle;
  },

...
}

Thank you so much, I have been looking for a script that buys when red heiken Ashi turns green, and sells when it turns red agian.

Aldo i didnt get it to work. Can you please assist me ? Should i put this script in strategy folder, and is it enought or should i do something else. 

Thank you so much for the help


RE: Heikin Ashi - Simone - 04-25-2019

Hi at all i'm new with Gekko but not with trading. I had the same idea to use heikin ashi to backtet some chart but i don't have idea how to put the code that you posted on this thread. Can somebody help me?


RE: Heikin Ashi - MichaelGonzales - 08-02-2020

I am having some doubts regarding the coding which you have posted three days back. I learned coding from best assignment help in uk blog articles which are written by experts. When I try to match the coding of yours and the one which I read in the article is not matching and having differences.


RE: Heikin Ashi - lindaween - 08-20-2020

I am fond of detective stories and poems. Currently I am reading https://bestwritingservice.com/essays/Review/analysis-of-sweat-by-zora-neale-hurston.html. It is an interesting genre. See if you are a bookwarm.


RE: Heikin Ashi - slimus5713 - 04-20-2021

Thanks for your help! Professional cv writing services near me and you! Just follow the link here. You will get the opportunity to have modern professional resume. It can be helpfull for all job seekers to be employed again.