Gekko Forum
[Bounty] Hiring someone to write a simple Strategy - Printable Version

+- Gekko Forum (https://forum.gekko.wizb.it)
+-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html)
+--- Forum: Strategy Development (https://forum.gekko.wizb.it/forum-12.html)
+--- Thread: [Bounty] Hiring someone to write a simple Strategy (/thread-1541.html)

Pages: 1 2


[Bounty] Hiring someone to write a simple Strategy - spellfire - 02-24-2018

Hello,
my developer skills are very (VERY) limited so I would like to hire someone to develope the strategy I am using "manually" at the moment.
It's not sophisticated , fancy or by any means new, it's the classic grid trading from forex markets

Basically you setup a price and put x limit-stop margin orders higher and lower than the set price, then when orders get filled  the script replace that order (a buy with a sell a sell with a buy)

As I said it's not AI , doesn't use any indicators , doesn't get you rich quickly...but it 's perfect for me :-)
Anyone willing to help with this for a price?


Thanks


RE: [Bounty] Hiring someone to write a simple Strategy - ManuManu - 02-24-2018

Here is something that should work :

Create a aroundPrice.js, and put it in your gekko/strategies folder :
Code:
var log = require('../core/log');

// Let's create our own strat
var strat = {};

// Prepare everything our method needs
strat.init = function() {
 this.input = 'candle';
 this.currentTrend = 'neutral';
 this.requiredHistory = 0;
 
 this.priceToWatch = this.settings.price_to_watch;
 this.percentUpper = this.settings.percentUpper;
 this.percentLower = this.settings.percentLower;
}

// Based on the newly calculated
// information, check if we should
// update or not.
strat.check = function(candle)
{
    if(this.currentTrend === 'neutral')
    {
        var lowLimit = this.priceToWatch *  ( 1 - this.percentLower/100.0 );
        if ( candle.close < lowLimit )
        {
            this.advice('long');
            this.currentTrend = 'long';
            log.debug("Going long at " + candle.close + " - under : " + lowLimit );
        }
    }
    if (this.currentTrend === 'long')
    {
        var highLimit = this.priceToWatch * ( 1 + this.percentUpper / 100.0);
        if ( candle.close > highLimit )
        {
            this.currentTrend = 'neutral';
            this.advice('short');
            log.debug("Going short at " + candle.close + " - above : " + highLimit );
        }
    }
}


module.exports = strat;


Then create a aroundPrice.toml file and put it into the gekko/config/strategies folder :
Code:
price_to_watch = 10
percentUpper = 10
percentLower = 10


Set the price you want, the upper and lower percentage thresholds,
And that's it...


Not sure it really deserve a bounty, though !


ManuManu

Ps : I tried it on ETH/USDT Binance, from 01/01/2018 to 1st of february, with 1000 to watch +/- 5%, and it gave me +116% in backtest...


RE: [Bounty] Hiring someone to write a simple Strategy - spellfire - 02-25-2018

Thank you very much for answering , if I read correctly the code the strategy you wrote goes long or short when threshold are reached.

The grid trading is a little different:
starting from the current price(let's say 10.000 usd for a btc) you set for example 10 limit stop buy order and 10 limit stop sel order at different steps

so you buy at 9900 9800 9700 9600 9500 ... 9000
You sell at 10100 10200 ... 11000

There is always thsi grid o if the price goes to 10100 and you sell... you setup an order to buy at 10000 (So if price moves in any direction you profit 10100 - 10000 = 100 (minus fees)
THe starting and ending price doesn't matter because you make profit from the swings the price has. For every buy order there will be a sell at a profitabke price and vice versa (unless price goes down or up FOREVER).
Limit Stop Orders are needed to avoid big losses in case prices goes very high or very low

The reason i think it deserves a Bounty is because understanding how the grid works needs time and time has a value for the developer who will do it.


RE: [Bounty] Hiring someone to write a simple Strategy - ManuManu - 02-25-2018

Smile
It couldn't be something that simple !

if I understand you correctly, what you have in mind is :

- Starting price is 10.000
- new price is under 9900 => buy
- new price is under 9800 => new buy
- the price raise to 10100 => sell ( the whole sum ? )

actually, if you had this kind of thing in mind, it's not doable for now with Gekko : you always buy and sell your whole wallet, so two consecutive buys are not possible.

Does it make sense ?

Manu


RE: [Bounty] Hiring someone to write a simple Strategy - spellfire - 02-25-2018

(02-25-2018, 02:26 PM)ManuManu Wrote: Smile
It couldn't be something that simple !

if I understand you correctly, what you have in mind is :

- Starting price is 10.000

>>YES

- new price is under 9900 => buy

>>Buy a fixed quantity let's say 0.1 And AT THE SAME TIME set a sell order at 10000 for same quantity

- new price is under 9800 => new buy

>>Buy a fixed quantity let's say 0.1 And set a sell order at 9900 for same quantity


- the price raise to 10100 => sell ( the whole sum ? )

>>No, before that price reaches 9900 (and there you sell 0,1 remember you bought at 9800) then price reaches 10000 (and there you sell 0,1 remeber you bought at 9900) then  you reach 10100 and sell 0.1 .




actually, if you had this kind of thing in mind, it's not doable for now with Gekko : you always buy and sell your whole wallet, so two consecutive buys are not possible.
>>Didn't know this about gekko, at least you told me thank you :-)



>>Even though I can't do it if you are curious on how  grid trading works (you profit wether trend is doing up or down and it's market neutral...no need for you to guess price or) please let me know...wouldn't like to bore you with unwanted details.
As I said at the oment I am doing it manually so I can just show you my Bitfinex screenshots






Manu



RE: [Bounty] Hiring someone to write a simple Strategy - ManuManu - 02-25-2018

Actually, I've just watched a presentation on a bot that is behaving like your behavior :
https://www.youtube.com/watch?v=b-8ciz6w9Xo&feature=youtu.be


It's interesting !
Are you getting some good results with this method ?
And if the price is down for more than 10% you, don't have any more money to invest ?
Do you increase the step to take that into account ?


RE: [Bounty] Hiring someone to write a simple Strategy - Kromdore - 02-25-2018

This is typically called a market making strategy if i understand the concept correctly.

You need a lot of capital to make it worthwhile i think


RE: [Bounty] Hiring someone to write a simple Strategy - spellfire - 02-26-2018

(02-25-2018, 08:40 PM)ManuManu Wrote: Actually, I've just watched a presentation on a bot that is behaving like your behavior :
https://www.youtube.com/watch?v=b-8ciz6w9Xo&feature=youtu.be


It's interesting !
Are you getting some good results with this method ?
And if the price is down for more than 10% you, don't have any more money to invest ?
Do you increase the step to take that into account ?

The results are ok with me (I am not a "GetRichQuick" kind of person)

19% a month without any Negative run

My money managment strategy is simple, i need to be able to cover untill 40% up and down (very possible if we speak of BTC /USD)
I loose some opportunities of profit when i sleep or when i am busy and can't refill orders

It's not the  +506% that some backtesting do but since risks are low, for me is ok.

When trend goes ONLY up or ONLY down you loose money if you are not able to wait  for it to be swinging again. If I am sure of something on Crypto is that price will soon swing  up and down

1 LAst note I am a Hodler kind of guy so doing it with margin trading helps me keeping in BTC and ETH and still profit if BTC price goes up.


RE: [Bounty] Hiring someone to write a simple Strategy - donkykong017 - 02-26-2018

(02-26-2018, 07:04 AM)spellfire Wrote:
(02-25-2018, 08:40 PM)ManuManu Wrote: Actually, I've just watched a presentation on a bot that is behaving like your behavior :
https://www.youtube.com/watch?v=b-8ciz6w9Xo&feature=youtu.be


It's interesting !
Are you getting some good results with this method ?
And if the price is down for more than 10% you, don't have any more money to invest ?
Do you increase the step to take that into account ?

The results are ok with me (I am not a "GetRichQuick" kind of person)

19% a month without any Negative run

My money managment strategy is simple, i need to be able to cover untill 40% up and down (very possible if we speak of BTC /USD)
I loose some opportunities of profit when i sleep or when i am busy and can't refill orders

It's not the  +506% that some backtesting do but since risks are low,  for me is ok.

When trend goes ONLY up or ONLY down you loose money if you are not able to wait  for it to be swinging again. If I am sure of something on Crypto is that price will soon swing  up and down

1 LAst note I am a Hodler kind of guy so doing it with margin trading helps me keeping in BTC and ETH and still profit if BTC price goes up.

this seems to be a very safe method. what i do not understand is that the start prize, prize to watch is a fixed value. what do you do when the market goes above that and stays there or has a long up trending motion. you will not be able to buy again without changing the strat params.


RE: [Bounty] Hiring someone to write a simple Strategy - spellfire - 02-26-2018

[quote pid='2203' dateline='1519634913']

this seems to be a very safe method. what i do not understand is that the start prize, prize to watch is a fixed value. what do you do when the market goes above that and stays there or has a long up trending motion. you will not be able to buy again without changing the strat params.
[/quote]

The start price is exactly the price your currency has when you start the trade.

When the market goes up you follow it with your sell and buy orders , remeber every time it goes down by a step in the grid, you profit (rarely it just simply goes ONLY UP in a straight line, but it has ups and downs)

Remember you don't profit from the value of the currency but from it's volatility.

It's nothing new, in forex grid trading are used a lot