EMA tradingview to Gekko
#1
Hello,
How to translate tradingview Pinscript :
Code:
a = ema(b, c)


To Js for Gekko in a strategy


I found this in documentation :

Code:
method.init = function() {
 var weight = 10;

 // add the indicator to the strategy
 this.addIndicator('myema', 'EMA', weight);
}

method.check = function() {
 // use indicator results
 var ema = this.indicators.myema.result;

 // do something with macdiff
}

do I have to write 
Code:
method.init = function() {
 var b = 10;
    var c = 10;

 // add the indicator to the strategy
 this.addIndicator('myema', 'EMA', b, c);
}

thanks for your help.

Heart
  Reply


Messages In This Thread
EMA tradingview to Gekko - by mikealkeal - 10-14-2018, 07:37 PM
RE: EMA tradingview to Gekko - by mark.sch - 10-15-2018, 08:31 AM
RE: EMA tradingview to Gekko - by mikealkeal - 10-15-2018, 06:05 PM

Forum Jump:


Users browsing this thread: