Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 4,942
» Latest member: LBN
» Forum threads: 859
» Forum posts: 4,199

Full Statistics

Online Users
There are currently 69 online users.
» 0 Member(s) | 69 Guest(s)

Latest Threads
CryptoTab Browser
Forum: General Discussion
Last Post: LBN
58 minutes ago
» Replies: 0
» Views: 4
Packers And Movers Best R...
Forum: General Discussion
Last Post: zoeymalik
Yesterday, 09:56 AM
» Replies: 0
» Views: 13
Complete Gekko's datasets...
Forum: General Discussion
Last Post: fadi0811
11-12-2019, 08:05 AM
» Replies: 22
» Views: 16,560
Issue : sometimes, Gekko ...
Forum: Technical Discussion
Last Post: npuchois
11-11-2019, 06:56 PM
» Replies: 0
» Views: 27
Importing csv files to Ge...
Forum: Feature Requests
Last Post: Humpty1988
11-10-2019, 04:31 PM
» Replies: 0
» Views: 35
First Start Error module....
Forum: Technical Support
Last Post: Mieko53
11-10-2019, 04:14 AM
» Replies: 9
» Views: 5,786
An official Gekko service...
Forum: Announcements
Last Post: mambotech
11-09-2019, 02:24 PM
» Replies: 32
» Views: 32,886
Cannot read property 'tim...
Forum: Technical Support
Last Post: mambotech
11-08-2019, 06:02 PM
» Replies: 0
» Views: 37
Coinase Pro
Forum: General Discussion
Last Post: mambotech
11-08-2019, 06:05 AM
» Replies: 0
» Views: 51
Ichimoku Indicator
Forum: Strategy Development
Last Post: ardialamwijaya
11-07-2019, 04:16 AM
» Replies: 13
» Views: 13,144

 
  Inverse Fisher RSI Strat- only returns false.
Posted by: lucascostner - 09-11-2019, 01:27 AM - Forum: Strategy Development - Replies (2)

Hey everyone- hope you can help me out with this. I've been revisiting an old strategy post from a year or so ago. So this doesn't generate any errors when I run it, but something is off because the IFRSI indicator never returns anything. When I console.log to print the result as it runs it always comes back with "false"- it should be returning 0.5 or -0.5. Anyone have any advice for me on this? The two required indicators and the strategy file are below.....


Here is the first indicator:



/indicators/IFTRSI.js   


Code:
var RSI = require('./RSI.js');
var WMA = require('./WMA.js');

var Indicator = function(config) {
 this.result = false;
 this.rsiInterval = config.interval;
 this.wmaLength = config.length;
 this.rsi = new RSI({interval: this.rsiInterval});
this.wma = new WMA({length: this.wmaLength});
}

Indicator.prototype.update = function (candle) {
 this.rsi.update(candle);
 if (this.rsi.result) {
   let v1 = 0.1 * (this.rsi.result - 50);
   this.wma.update(v1);

   if (this.wma.result) { 
       this.result = (Math.exp(2 * this.wma.result)-1) / (Math.exp(2 * this.wma.result)+1);
   }
 }
}

module.exports = Indicator;


Here is the second indicator-


 /indicators/WMA.js


Code:
var Indicator = function(settings) {
   this.input = 'price';
   this.windowLength = settings.length;
   this.prices = [];
   this.result = 0;
   this.age = 0;
   this.sum = 0;
}

Indicator.prototype.update = function(price) {
   var tail = this.prices[this.age] || 0;
   this.prices.push(price);


   var psum =0;
   var pdiv = 0;

   for (var j=0;j<this.prices.length;j++)
   {

       psum += j * this.prices[j];
       pdiv += j;

   }

   this.result = psum/pdiv;
   if (this.prices.length > this.windowLength)
   {
       this.prices.shift()

   }

   this.age = (this.age + 1) % this.windowLength
}

module.exports = Indicator;

And here is the strategy file--


/strategies/IFRSI.js

Code:
var method = {};
var traded = false;
var IFTRSI = require('./indicators/IFTRSI.js');
method.init = function() {
    var iftrsiParameters = {rsiInterval: 14, wmaLength: 8};
    this.addIndicator('iftrsi', 'IFTRSI', iftrsiParameters);
    
}
method.update = function(candle) {
    this.indicators.iftrsi.update(candle);
  
}
method.check = function(candle) {
    var iftResult = this.indicators.iftrsi.result;

    console.log(iftResult);

if ( traded == false && iftResult == -0.5 ){
    this.advice('long')
    traded = true;
    console.log(iftResult);
} else if(traded == true && iftResult == 0.5 ){
    this.advice('short')
    console.log(iftResult);
    traded = false;
}
}


module.exports = method;


  Whats the correct way to pass information from plugin to indicator
Posted by: emjayar - 09-10-2019, 10:52 AM - Forum: Technical Discussion - No Replies

Hi there,

I have an async plugin that loads some information that is to be used by an indicator. So the indicator depends on that plugin. 

How to correctly pass information from plugin to the indicator in this framework without having to resort to global variable hackery?

Thanks!

Cheers,


M


  Plugin execution order
Posted by: emjayar - 09-10-2019, 10:24 AM - Forum: Technical Discussion - No Replies

Hi there,

I'd like to create a plugin that acts as an advisor to my strategy. So ideally it should be updated before the strategy gets updated. This way the plugin might decide to fire off an event to which the strat is subscribed and then in the update of the strategy it uses the result of the plugin.

However I noticed that plugins seem to be updated after the strat update() and check() methods. I can add some hackery in the code to change execution code for particular plugins, but chances are that I'm probably doing something wrong. 

So the question is: how to properly setup some sort of plugin that advises the main strategy, so that the main strategy can use that result in its check() or update() method?

Thanks!



M


  How to retrieve candle size for strategy
Posted by: PGTART - 09-09-2019, 11:02 PM - Forum: Strategy Development - Replies (2)

I would like to make my strategies less depent on time intervals.
EA a max price swing between 5 minutes is statistically smaller then with 60 minute candles.

So when i use constants in my math i'd like to scale them by a factor of candle size  ea :

candlesize
-------------   *   constant
60

How can  i retrieve  candlesize inside the strategy ?


Star VmaPredict2.js (new)
Posted by: PGTART - 09-09-2019, 04:02 PM - Forum: Strategy Development - Replies (67)

Its a new strategy based upon volume prediction and moving averages.
Still tweaking it around, it started with reasonable profit chances.
Continous tweeking and I got to version 5 (and more), at which under the right settings high profits where made. 

It can be found here https://github.com/PGTBoos/GekkoStrategies (where you find other strategies from me as well).

By now the code base has grown large over 300 lines, while simple to maintain and to extend.
You free to use or test it, however in return i'd like you to post the settings file (and what you where trading) in return here
Let me now your tweaking results or code alterations, your highest scores.  
Because i cannot code and test at the same time.

Also I like to point out that it logs to console
And the code base is realy handy to use as a template.
Its a code template i will stick too

A default TOML is included as well for every version.
Once a version is made i dont extend it, some version behave different so you can get different results with each version.
One might stick to a certain version, or use the latest version. (generally speaking later is often better).

(the strategy may require a bit longer time I testedit  against 2 and 7 months)


Star Looking for a dev to integrate gekko into our trading terminal
Posted by: kodjima33 - 09-07-2019, 01:33 PM - Forum: Technical Discussion - No Replies

Hey guys! We are looking for a backend developer who has experience in:
-gekko 
-node.js 
-postgreSQL.
I am a product owner in Fund Platform - software for crypto fund managers. We have an algotrading feature so that customers can connect their exchanges and write algorithms using gekko.



Hope we can find somebody here.  I am really sorry for an off-topic post. 
 My telegram is: @ceofundplatform


Star Looking for a dev to integrate gekko into trading terminal
Posted by: kodjima33 - 09-07-2019, 01:31 PM - Forum: General Discussion - Replies (1)

Hey guys! We are looking for a backend developer who has experience in:
-gekko 
-node.js 
-postgreSQL.
I am a product owner in Fund Platform - software for crypto fund managers. We have an algotrading feature so that customers can connect their exchanges and write algorithms using gekko.


Hope we can find somebody here.  I am really sorry for an off-topic post. 
 My telegram is: @ceofundplatform


  My idea -- I need your input on a simple/basic code
Posted by: db071 - 09-03-2019, 06:03 AM - Forum: Strategy Development - Replies (1)

Hi all,

I am active in the forums here, so I'm posting this as a last resort at not being able to find anything else.

I am not much of a coder.  So my question is this:

Is there a pre-existing strategy for this, or can someone provide be with basic code layout for a .js strategy and .toml config please?

I simply need this as a building block.

SO!

I need to code a strategy that will sell at exactly 1.48% profit from last buy price on GDAX (coinbase pro).  After that sell, I need it to buy at -1.48% of the current price.  And so on, and so forth.

Any ideas?


Star New strategy : RSI_BULL_BEAR_ADX_PINGPONG_PEEKTREND
Posted by: PGTART - 09-02-2019, 02:19 PM - Forum: Strategy Development - Replies (11)

I extended  a strategy  named "RSI_BULL_BEAR_ADX_PINGPONG" with _PEEKTREND

You can find the code originally written by Tommie Hansen and Rafel Martin (CC-BY-SA 4.0)
And adjusted by me here :   https://github.com/PGTBoos/GekkoStrategies

About    _PeeKtrend
Most stoploss functions I've seen just get out of the market if the price is below a percentage or a fixed amount, of the original bought price.
Well, I'm no great fan of that, there is nothing wrong about going short, (as it can allow for a new long from a lower start).
However I don't want to go down the whole ride again, or just less of it.

So PeekTrend keeps track of the highest price since you went long. 
The highest price named MaxPeekClose is calculated as :     ( candle.close * closeRatio + candle.high *highRatio) / (closeRatio+HighRatio)
Then short depends upon  candle.close < MaxPeekClose * peekPercentage + peekShift
This is logged to the gekko console as well as escaped failing trend with some additional data.
I log that to console since if it happens to frequent the other code wont kickin there should be some balance between this and that to get it good working.

If no short happens then the original code continuous trading
   (the greens are on top of the TOML file )

The above math still can loose you money as its not a HODL, but one might escape earlier.
If sudden price spikes happen (but you missed them) and shortly after the price falls deep.
Then the peeks raised the upper bar and so you can have some part of the peak (instead of the deep fall).
Where the original code didn't.


at the bottom of the post, there is a screenshot of the code in a market that went slightly down the TOML provided was unaltered
So under the same conditions, you get the same.

Oh well but essentially this is where you come in !!!!
Please  test it, find better settings or alter it, and let others now here  
For those who want to alter the code
I placed a small note in the check function maybe you can help me with that.


I could improve PeekTrend function even more if somehow I could retrieve the price at which a long was really buying coins, ea not the last close.
So if you know how to let me know, please.

side note, I noticed the code can be configured to work well with various time ranges.

[Image: RSI_BULL_BEAR_ADX_PINGPONG_PEEKTREND.PNG]



(oh and wow after a lot of hacking managed to run GEKKO normally on windows without BASH ! ... see other threads here for that ).


  Importing data
Posted by: Kocojambo - 08-30-2019, 04:44 AM - Forum: Technical Discussion - No Replies

Hello everyone, I ran into a problem, when i`m start download of any data, this process is too slowly and i can`t resume it. Therefore there are many unfinished databases that I cannot connect with each other. Who can help with this? I need to either connect the downloaded databases or make it possible to continue downloading the next day.