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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 20,732
» Latest member: eveamelia102
» Forum threads: 1,541
» Forum posts: 7,732

Full Statistics

Online Users
There are currently 293 online users.
» 1 Member(s) | 292 Guest(s)
eveamelia102

Latest Threads
New Gekko UI in the works
Forum: Announcements
Last Post: dejaoffice
Yesterday, 10:44 AM
» Replies: 137
» Views: 156,412
Gekko development status ...
Forum: Announcements
Last Post: zerzamilmu
04-20-2024, 11:39 AM
» Replies: 806
» Views: 536,252
An official Gekko service...
Forum: Announcements
Last Post: CaroleDennis
04-20-2024, 04:03 AM
» Replies: 85
» Views: 140,391
Gekko with malware spotte...
Forum: Announcements
Last Post: alisonagron
04-18-2024, 08:05 AM
» Replies: 130
» Views: 92,056
Gekko 0.6 released
Forum: Announcements
Last Post: sabinaholt
03-27-2024, 12:10 PM
» Replies: 104
» Views: 216,032
How to Soft Reset or Hard...
Forum: General Discussion
Last Post: lucifar
10-07-2021, 07:18 PM
» Replies: 22
» Views: 39,434
How to add Binance Future...
Forum: Technical Support
Last Post: Xavier32
10-07-2021, 02:20 PM
» Replies: 47
» Views: 81,851
Bittrex Configuration hel...
Forum: Bittrex
Last Post: yirzolusto
10-07-2021, 07:39 AM
» Replies: 6
» Views: 15,183
[Question] Why does gekko...
Forum: General Discussion
Last Post: cryptocurrency0
10-06-2021, 01:16 PM
» Replies: 16
» Views: 34,622
a couple of technical Que...
Forum: Technical Support
Last Post: mtom78632
10-06-2021, 11:08 AM
» Replies: 25
» Views: 45,749

 
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 (17)

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 - Replies (1)

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.


Star CSV candle logging and more !!, code giveaway
Posted by: PGTART - 08-28-2019, 04:09 PM - Forum: Strategy Development - Replies (22)

Although things can be logged in the databases
There still a lot of people in love with spreadsheets (excel, calc, etc)
So i made a comma value logger, that can easily be integrated in your own strategies.

  • A filename is automatically generated (based upon when you started), or it can be set manual
    In the later case, previous files with such a name would be deleted.
  • It logs candles numbered with date time info, close low high  etc etc
  • If you wish you can add additional values to your log file, in the update function add them as extralog (be sure to coma seperate them).
  • And since you investigating strategies you can also optionally prefix the filename, in the refresh call.
  • Also if you like headers in your file there is an option to set them as well.

  • Different linebreaks for linux vs Windows ea \n vs \r\n\  (for the notepad users )
  • The data collumns C,D,E,F can be directly put in LibreOffice Calc stock chart !!  (they are in the right order   (code updated)
Here is my code :
which can be placed on top in your own strategies code

Code:
var fs = require('fs');
var CVCandleLogger =
{
    linebreaktype:'',
    CandleNr:0,
    firstrun: true,
    stratname: '',
    filename: '',
    // one could log additional commma seperated info (like math results or buy sell info, using extralog)
    update: function (candle, extralog = '',stratname='') {
        this.CandleNr++;

        if (this.filename === '') //base it upon creation time if no filename was givven
        {
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
            var yyyy = today.getFullYear();
            var hh = String(today.getHours()).padStart(2, '0');
            var mm = String(today.getMinutes()).padStart(2, '0');
            today = yyyy + '-' + mm + '-' + dd + ' ' + hh + mm;
            this.filename = stratname + ' log ' + today + '.log';
        }

        if (this.firstrun) {
            var isWin = process.platform === "win32";
            if(isWin)this.linebreaktype='\r\n';else this.linebreaktype='\n';

            fs.access(this.filename, (err) => {
                if (!err) {
                    console.log('previous log file name existed, deleting it');
                    fs.unlink(this.filename);
                }
                console.log('New candle data log :', this.filename);
            });
            this.firstrun = false;
        };
        var moment = String(candle.start);
        console.log(moment);
        var timestamp = moment.substring(0, moment.lastIndexOf(' GMT'));
        
        var logline = this.CandleNr+','+ timestamp + ',' + candle.open + ',' + candle.close +','+ candle.high + ',' + candle.low + ','  + candle.vwp + ',' + candle.volume + ',' + candle.trades
        if (extralog !== '') logline = logline + ',' + extralog;
        logline=logline+this.linebreaktype;
        fs.appendFile(this.filename, logline, function (err) {if (err) throw err;});
    },

    writeheader: function(extralog='',stratname='')
    {
        if (this.filename === '') //base it upon creation time if no filename was givven
        {
            var today = new Date();
            var dd = String(today.getDate()).padStart(2, '0');
            var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
            var yyyy = today.getFullYear();
            var hh = String(today.getHours()).padStart(2, '0');
            var mm = String(today.getMinutes()).padStart(2, '0');
            today = yyyy + '-' + mm + '-' + dd + ' ' + hh + mm;
            this.filename = stratname + ' log ' + today + '.log';
        }
        if (this.firstrun) {
            fs.access(this.filename, (err) => {
                if (!err) {
                    console.log('previous log file name existed, deleting it');
                    fs.unlink(this.filename);
                }
                console.log('New candle data log :', this.filename);
            });
            this.firstrun = false;
        };

        logline ='CandleNr, date,time, open , close,high ,low,vwp ,volume , trades' ;
        if (extralog!=='')logline=logline+','+extralog;
        fs.appendFile(this.filename, logline, function (err) {if (err) throw err;});
    }

};

if you put above code on top in your strategy just below :  var config=require('../core/util/js').getconfig();

then only one line is enough to get you started with it

    /* CHECK */
    check: function (candle) {

        CVCandleLogger.update(candle); //minimal sample  find the log outputs in your gekko folder !

 ...
..

oh and the function CVCandlelogger.writeheader();
can be placed in your init part of your strategy, its not required but might be handy for excel / calc.


Question how to console.log profit rate ?
Posted by: PGTART - 08-26-2019, 01:23 PM - Forum: Strategy Development - No Replies

Currently developing some improvements to bull/bear strategies.
It would be handy for debugging my code  to get the profit % to console.log when i do a short

how to get that, is it simply the previous.close and current candle close.. or does it works a bit more advanced ?.
(as that is not guaranteed to happen in real life to get it like that).


Exclamation Added dual stoploss to RSI_BULL_BEAR_ADX
Posted by: PGTART - 08-24-2019, 11:14 AM - Forum: Strategy Development - Replies (4)

I extended a known script called: RSI_BULL_BEAR_ADX

In such a way that it has two stoploss settings, one for Bull and one for Bear markets.

However now i am wondered about generic stoploss math, as in other strategies.
Most of the times i see some percentage of the last long candle close buy to not go below that.
Sometimes i see people using a stoploss with a fixed amount, say 50 dollar or so, since last long candle close.

But i'm wondered I could also code to memorize the highest and lowest candle stops - since -  my last  long bu advice.
So create a stoploss that would stop after the highest values since my last buy would drop more then a certain  percentage
I dont know enough of the background ideas behind RSI_BULL_BEAR_ADX if that would make sense or not.
And am worried if that would be an antipatten to code in regards to the ADX part of it.

What do you people think of alternative stoploss rules ?
And maybe you know of perhaps more afvanced stoploss rules ?



perhaps nice to see some logging of the not yet ready code as want validate it a bit more first :
I log to console:

Bear long at 9592 stoploss: bear<9113 bull< (misssing) // missing is bug
Bear short
Bull long at 9883 stoploss: bear<9389 bull<9834             // after each long i recalculate bot stoplosslevels so i can swing  from bear/bull markets
Bull stoploss triggered on 9775  Bullstop was 9786
Bull long at 10450 stoploss: bear<9928 bull<10398
Bull stoploss triggered on 10483  Bullstop was 10537
Bull long at  10564 stoploss: bear<10036 bull<10511
Bull stoploss triggered on 10501  Bullstop was 10511
Bull long at  10838 stoploss: bear<10296 bull<10783
Bull stoploss triggered on 10777  Bullstop was 10848   //interesting making profit from bull to bear market.
Bear long at  9673 stoploss: bear<9189 bull<(missing)
Bear short


  Possible to visualize more?
Posted by: emjayar - 08-20-2019, 01:04 PM - Forum: General Discussion - Replies (2)

Hi there,

Is it possible with the backtesting to add more graphs (e.g., indicator output) to the result window? Currently I only see the closing price plotted there, but it would be very helpful to superimpose other information on that graph.

Thanks!


  New arbitrage cryptocurrency bot
Posted by: Robin banks - 08-15-2019, 11:19 AM - Forum: General Discussion - No Replies

Hi I’m just wondering has anyone  heard of of **Jubilee Ace?** It is the most advanced arbitrage bot out there. No need to do arbitrage over different exchanges, they do it all within Binance. 

Anyone interested can join our discord sever!!

https://discord.gg/vjSqbzf