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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 5,124
» Latest member: victus_sanctus
» Forum threads: 875
» Forum posts: 4,239

Full Statistics

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

Latest Threads
VmaPredict2.js (new)
Forum: Strategy Development
Last Post: PGTART
01-15-2020, 12:04 PM
» Replies: 70
» Views: 13,272
Daily Forex News
Forum: General Discussion
Last Post: xtreamforex
01-15-2020, 11:29 AM
» Replies: 34
» Views: 7,219
Cuora Mccordi,Aurocapitat...
Forum: General Discussion
Last Post: reptilefarm01
01-15-2020, 03:14 AM
» Replies: 0
» Views: 47
Cuora Mccordi,Aurocapitat...
Forum: General Discussion
Last Post: reptilefarm01
01-15-2020, 03:07 AM
» Replies: 0
» Views: 64
Problem installing Gekko
Forum: Technical Support
Last Post: garfield25
01-10-2020, 01:52 PM
» Replies: 0
» Views: 108
Looking for pair programm...
Forum: General Discussion
Last Post: sirbroseiden
01-08-2020, 05:06 PM
» Replies: 2
» Views: 340
Problems with coinfalcon
Forum: Other exchanges
Last Post: Magnavox
01-07-2020, 07:32 PM
» Replies: 4
» Views: 3,186
Amazon Web Server and Gek...
Forum: Guides
Last Post: TCMabe
01-06-2020, 10:26 PM
» Replies: 17
» Views: 13,102
Is bitpanda supported?
Forum: General Discussion
Last Post: PGTART
12-31-2019, 03:43 PM
» Replies: 0
» Views: 105
error exchange
Forum: Technical Discussion
Last Post: dakasti
12-29-2019, 09:38 PM
» Replies: 0
» Views: 161

 
  What's the variable holding the last filled buy order price?
Posted by: orpheous - 09-20-2019, 02:30 AM - Forum: General Discussion - Replies (1)

Is there a feature that holds the last filled buy order price that I can include in my strategy?


Exclamation How to retrieve balance
Posted by: PGTART - 09-14-2019, 01:45 PM - Forum: Technical Discussion - No Replies

So far I've not seen any strategy looking at the personal balance, or any coding example.
ea all  gains of trades are estimated upon candle.close math

Which is nice but at some point one could be trough all his/her invested money.
So my question how to retrieve the current balance (after a short).

Also where to set the starting balance.

Otherwise, lots of strategies dont make sense, i mean it's nice to have invested 1000 euro.
But when one loses 1500 euro in a trade and then next make 3000 profit then that could never have happened (since you where broke allready).

It seems quite vital to know the current balance.
And i would like to handle this in my strategies.


  We are hiring a node.js dev who has experience with gekko
Posted by: kodjima33 - 09-12-2019, 01:47 PM - Forum: Third Party Software - 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

Horly payments up to $25/hour


  Gekko Docker
Posted by: Stixx - 09-12-2019, 08:17 AM - Forum: Technical Support - No Replies

Thanks for this awesome program. I am trying to install this on unraid using docker but have a couple of questions, is there a way to make it persist so I can recreate the container and keep settings?
Also when the container restarts the strat runners stop, is there a way to resume where you left off?


  candlestickTrader (new)
Posted by: PGTART - 09-11-2019, 12:17 PM - Forum: Strategy Development - No Replies

So you've seen some youtube or red some books and thought Candle sticks are hot.
Oh well, I did for a while and stumbled upon some code on the internet, bug fixed it, and then extended it to trade basically.
This is not optimal code yet,. I wrote lots of comments in it,
So someone may find the time to expand upon this one, to improve the results.

I share candlestickTrader as a raw version of code with lots of comments.
I have less time to work out this one, but I hope someone else can continue on it.



Notice some functions I already added into in the code but currently are not used.

So bugs where resolved it does trade on candles,
But I think the whole idea behind candlestick patterns is flawed (oversimplified)  and not all of the theory behind is used
See partly my comments about it in the code, also some parts made no sense to me as I didn't understood it, your welcome to enlight me

This is not yet a good trading bot, but yes it does do candle trading (mostly).

Notice also that this strategy creates csv log files, for research and debugging (in the main Gekko folder)
Since Gekko doesn't show candlesticks, I figured you may like to see the raw data in Excel or Calc to verify this kind of trading.

Read the comments in the code before asking about this strategy
The comments contain lots of info.
I know this is not a very good trader at the moment, but it might be a good starting point to create one
As essentially the candle patterns are derived from the market in this piece of code.
 
There is no TOML file included, so I enforce you to alter the code if you like to change values, (it doesn't readout a toml file currently).

Oh one warning
Trading on Doji is highly risky
While it does spot a Doji, I decided not to trade on it.. (told earlier the theory isn't fully used)
Doji trading requires more market info and is better avoided if you don't know what to look for.
I got many thoughts about that, but I let you free to code that yourself
You can share your code here if you got something working stable on it.
Just didn't want to put people into high risks.

code can be found here: https://github.com/PGTBoos/GekkoStrategies


Question Understanding the Gekko MACD strategy
Posted by: Thluks - 09-11-2019, 11:11 AM - Forum: General Discussion - No Replies

How do I get the MACD strategy to create a buy or sell order at the exact time of the crossover?

I'm looking at a 12/26/9 MACD with 30min candles on TradingView.com. It seems pretty clear to me when to buy and when to sell and make good profits, but of course I don't want to do that 24/7.

Trying to replicate that in Gekko, I'm thinking if I set the thresholds to 0 or a very small number like 0.00025 it should then react immediately on the crossover (with persistence = 0). But the backtest result doesn't seem to match up with the cross overs I see on TradingView. Buy and sell signals are all over the place.

Is there a way to see the MACD lines that Gekko is using to generate the signals, in the web UI? That would help a lot to understand and tweak.

Thanks!


  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 ?