I'm new here at Gekko - Problems
I made a strategy where every time they cross the middle, buy or sell.

I'm working with binance ...

What is certain is that theft opens but then closes soon.

Can someone explain what I'm doing wrong?

var strat = {};

// Prepare everything our strat needs
strat.init = function() {
 this.name = 'GTR';
 this.trend = 'none';

 this.requiredHistory = this.tradingAdvisor.historySize;

 this.addTulipIndicator('slow', 'ema', {
   optInTimePeriod: this.settings.slow

 this.addTulipIndicator('fast', 'ema', {
   optInTimePeriod: this.settings.fast


// What happens on every new candle?
strat.update = function(candle) {


strat.log = function(candle) {
 // nothing!

strat.check = function(candle) {

 const ema1 = this.tulipIndicators.slow.result.result;
 const ema2 = this.tulipIndicators.fast.result.result;
 var   priceclose = candle.close;

   if (ema1 > ema2){
       this.trend = 'Compra';


   if (ema1 < ema2){
     this.trend = 'Venda';



module.exports = strat;

Attached Files
.jpg   Screenshot_1.jpg (Size: 169.61 KB / Downloads: 9)
Going to graduate school was a positive decision for me. I enjoyed the coursework, the presentations, the fellow students, and the professors. And since my company reimbursed 100% of the tuition, the only cost that I had to pay on my own was for books and supplies. Otherwise, I received a free master’s degree. All that I had to invest was my time. Vakantiehuis huren

Forum Jump:

Users browsing this thread: