This is not an issue. Just the idea to make better sell or buy.
To make a better decision, I will base on three indicators: Bollinger Bands (upper line, middle line, and bottom line), MACD, and Relative Strength Index as shown from top to bottom of the below figure.
Buy decision must satisfy three conditions:
Sell decision must satisfy three conditions:

Could we make a custom Strategy from the condition? Thank you
That sounds like a great strat, and yes definitely this is a very easy and doable strategy!
This is all information you need to know how to create it: https://gekko.wizb.it/docs/strategies/creating_a_strategy.html
I'm messing with it right now. The backtesting on this strat with two indicators plus 'bbands' from TAlib is bizarrely slow, anyone knows if this is normal? If TAlib has such bad performance we should make a BBands indicator...
Talib is a disgrace speed wise.
Write BB as a native and it's super speedy.
Yes, native BBands runs normally..
Wrote this indicator, might even be correct. Maybe it helps @John1231983
BB.js
// required indicators: SMA;
// Bollinger Bands implementation;
var SMA = require('./SMA.js');
var Indicator = function(BBSettings) {
this.settings = BBSettings;
this.center = new SMA(this.settings.TimePeriod);
this.lower=0;
this.middle=0;
this.upper=0;
}
Indicator.prototype.calcstd = function(prices, Average)
{
var squareDiffs = prices.map(function(value){
var diff = value - Average;
var sqr = diff * diff;
return sqr;
});
var sum = squareDiffs.reduce(function(sum, value){
return sum + value;
}, 0);
var avgSquareDiff = sum / squareDiffs.length;
return Math.sqrt(avgSquareDiff);
}
Indicator.prototype.update = function(price) {
this.center.update(price);
this.middle = this.center.result;
var std = this.calcstd(this.center.prices, this.middle);
this.lower = this.middle - this.settings.NbDevDn * std;
this.upper = this.middle + this.settings.NbDevUp * std;
}
module.exports = Indicator;
Hello all, I was implemented the scheme
Sell
-StochRSI is high and MACD is up direction
Buy
-StochRSI is low and MACD is down direction
This is my current js code
https://gist.github.com/John1231983/0822062d6e252dda82e1759bb47ef4fb
Currently, I did not combine the BBands scheme. @Gab0 : Could you guide me how can I combine it in the above code?
@askmike : How about my implementation for combination of two StochRSI and MACD? This is my setting
config.StochRSI_MACD = {
interval: 14,
short: 12,
long: 26,
signal: 9,
thresholds: {
low: 20,
high: 80,
down: -0.1,//-2,//-0.1,
up: 0.1,//1.5,//0.25,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 3
}
};
1- that file I posted is BB.js and should be put in strategies/indicators
2- add your new indicator at plugins/baseTradingMethod.js, there is a list named Indicators there. So just append
BB: {
factory: require(indicatorsPath + 'BB'),
input: 'price'
}
3- now to the strategy file (create at strategies/):
this step is on gekko docs
at method.init:
this.addIndicator('bb', 'BB', this.settings.bbands);
at method.check:
var BB = this.indicators.bb;
//BB.lower; BB.upper; BB.middle are your line values
4- settings:
bb requires:
bbands: {TimePeriod: 20,
NbDevDn: 2,
NbDevUp: 2
}
add this entry "bbands" with its children to your settings and that's it.
@Gab0: Great. It worked well. Now I can get the upper, middle and lower value of BB. For current trades, we will have a green/red (buy/sell) column. For example, the current trades make a green column as the attached figure. Do you know how we can know the column will intersection with upper/middle/lower line. For the figure, the column is interesting with middle line. I am writing the figure in strategies to determine it. Thanks

@John1231983 Well, if the close value is below the lower line, or above the upper line, there is a intersection. Its just like if (price < BB.lower).
I have recreated this strat already, my version never trades... try yours and tell me the results.
Still have to try different confing values for MACD and RSI indicators....
Great. I got it. I am thinking about the number of intersection likes persistence. For example, if the intersection with the upper line is so much, we will think it will be in the downtrend. It likes a threshold value. I guess we use it will be safety.
For value, I think we must carefully do it in backtest. I was got 11.5 % profit when I apply combination between MACD and StochRSI for trading BCH from yesterday :)
hi there,
@John1231983 im trying out your strategy, but i dont understand why your file doesnt work on my gekko : I got this message
strategies\StochRSI_MACD.js:19
this.interval = this.settings.interval;
^
TypeError: Cannot read property 'interval' of undefined
Any hints ?
here's the code :
// let's create our own method
var method = {};
// prepare everything our method needs
method.init = function() {
this.interval = this.settings.interval;
this.trend = {
direction: 'none',
duration: 0,
persisted: false,
adviced: false
};
this.requiredHistory = this.tradingAdvisor.historySize;
// define the indicators we need
this.addIndicator('rsi', 'RSI', { interval: this.interval });
this.addIndicator('macd', 'MACD', this.settings);
this.addIndicator('bb', 'BB', this.settings.bbands);
this.RSIhistory = [];`
and
```// StochRSI settings
config.StochRSI = {
interval: 14,
thresholds: {
low: 20,
high: 80,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 3
}
};
// StochRSI_MACD Settings
config.StochRSI_MACD = {
interval: 14,
short: 12,
long: 26,
signal: 9,
thresholds: {
low: 20,
high: 80,
down: -0.1,//-2,//-0.1,
up: 0.1,//1.5,//0.25,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 3
}
bbands: {
TimePeriod: 20,
NbDevDn: 2,
NbDevUp: 2
}
};
// custom settings:
config.custom = {
my_custom_setting: 10,
}
```
Hi, I have update it. Let's check again. Rename the file to StochRSI_MACD_BB.js and at the line in the configure. Please let me know if it has any issue
config.StochRSI_MACD_BB = {
interval: 14,
short: 12,
long: 26,
signal: 9,
bbands: {
TimePeriod: 20,
NbDevDn: 2,
NbDevUp: 2,
persistence_upper: 10,
persistence_lower: 10,
},
thresholds: {
low: 20,
high: 80,
down: -0.1,//-2,//-0.1,
up: 0.1,//1.5,//0.25,
// How many candle intervals should a trend persist
// before we consider it real?
persistence: 2
}
};
Note that, I run in terminal not UI
@Gab0: I think the intersection between price and the middle line is not so good. We must compare with the median value of price. I think the line (as attached) has high/low/median value. Do you know how can we get the median value (center of line), instead of var price = candle.close;?

And this is definition of box plot

@John1231983 This may be just var median = (candle.open+candle.close) / 2;
You can be more edgy and go var median = (candle.low+candle.high) / 2;
@John1231983 is it possible to share those scripts? I am using bbands via Talib:
this.addTalibIndicator('bbands', 'bbands', this.settings.bbands);
this produces NaN for both bbands.result.outRealUpperBand / bbands.result.outRealLowerBand
I see. I used another bbands as Gab0's answer. You just changed one thing in new version of gekko that is adding input: 'price' in the BB file. That is full code. If you have a good strategy. Welcome to share it
// required indicators: SMA;
// Bollinger Bands implementation;
var SMA = require('./SMA.js');
var Indicator = function(BBSettings) {
this.input = 'price';
this.settings = BBSettings;
this.center = new SMA(this.settings.TimePeriod);
this.lower=0;
this.middle=0;
this.upper=0;
}
Indicator.prototype.calcstd = function(prices, Average)
{
var squareDiffs = prices.map(function(value){
var diff = value - Average;
var sqr = diff * diff;
return sqr;
});
var sum = squareDiffs.reduce(function(sum, value){
return sum + value;
}, 0);
var avgSquareDiff = sum / squareDiffs.length;
return Math.sqrt(avgSquareDiff);
}
Indicator.prototype.update = function(price) {
this.center.update(price);
this.middle = this.center.result;
var std = this.calcstd(this.center.prices, this.middle);
this.lower = this.middle - this.settings.NbDevDn * std;
this.upper = this.middle + this.settings.NbDevUp * std;
}
module.exports = Indicator;
Hi noob question here how do you configure gekko to show a candlestick chart? Ps any chance someone could walk
Me through the setup?
cheers
@John1231983 @Gab0, your BB.js code is helpful. Thanks for sharing that. However as per this we must use the closing price of the candle and not the trade price, as done in your example (this.input = 'price' instead of this.input = 'candle'). I'm not a trader, so I don't know. Just pointing out for others.
I personally would use talib - I am busy setting up a multi-strategy bot using Gekko. For Talib you need the following:
npm remove talib tulind
npm install --production [email protected] [email protected]
// Bollinger Bands
this.addTalibIndicator('ind_bbands', 'bbands', this.settings.indicators.bbands);
and config:
// Bollinger Bands
// https://tradingsim.com/blog/bollinger-bands/
bbands: {
optInTimePeriod: 10,
optInNbStdDevs: 2,
optInNbDevUp: 2,
optInNbDevDn: 2,
optInMAType: 0
},
You would then access the values like the below (note, I have custom code, so you will need to rework some):
strat.check_bollingerBands = function(candle) {
let bbandsLower = this.talibIndicators.ind_bbands.result.outRealLowerBand;
let bbandsMiddle = this.talibIndicators.ind_bbands.result.outRealMiddleBand;
let bbandsUpper = this.talibIndicators.ind_bbands.result.outRealUpperBand;
if (typeof bbandsLower === 'undefined' || typeof bbandsUpper === 'undefined') {
// Need to wait, MACD is not defined
return;
} else {
this.trend.bbands.initialised = true;
}
// Store current values in trend
this.trend.bbands.curr_lower = bbandsLower;
this.trend.bbands.curr_middle = bbandsMiddle;
this.trend.bbands.curr_upper = bbandsUpper;
// Get the price
let curr_price = candle.close;
let trend_side = 'none';
if (curr_price <= this.trend.bbands.curr_lower) {
trend_side = 'long';
} else if (curr_price >= this.trend.bbands.curr_upper) {
trend_side = 'short';
}
// Update trend
this.check_UpdateTrend(this.trend.bbands, trend_side);
}
I am using a number of strategies with different indicators - it looks something like this (using DAT/USD):

@thakkarparth007 While when using trading exchange APIs directly the candle.close and price value are different (price is real time price, C.C. is the close of last full 1m candle), inside Gekko strats they are exactly the same.. Gekko extracts the price from candle.close;
@magicdude4eva On normal situations it may be practical to just use bultin TA-Lib indicators, but man they are slow as hell, so we who use genetic algorithms that rely on fastest possible backtesting its worth to port the indicators to gekko..
@phillwilk A plugin to plot graphics is yet to be written (I think o.o).. it would be fckin useful to test novel indicators, and check local dbs and stuff
@Gab0 cheers for the info would be useful to identify what indicators to use and confirm gekko is reporting the same as tradingview etc
@John1231983 I wanted to try your strategy but I'm getting this error when it attempts to calculate values. Any ideas?
017-12-21 17:22:23 (DEBUG): calculated StochRSI properties for candle:
2017-12-21 17:22:23 (DEBUG): rsi: 2501999792983709.00000000
2017-12-21 17:22:23 (DEBUG): StochRSI min: 126.88172043
2017-12-21 17:22:23 (DEBUG): StochRSI max: 2501999792983709.00000000
2017-12-21 17:22:23 (DEBUG): StochRSI Value: 100.00
/Users/a1/Desktop/tradebot/gekko/strategies/StochRSI_MACD_BB.js:68
var signal = macd.signal.result;
^
TypeError: Cannot read property 'result' of undefined
at Base.method.log (/Users/a1/Desktop/tradebot/gekko/strategies/StochRSI_MACD_BB.js:68:28)
at Base.bound [as log] (/Users/a1/Desktop/tradebot/gekko/node_modules/lodash/dist/lodash.js:729:21)
at Base.propogateTick (/Users/a1/Desktop/tradebot/gekko/plugins/tradingAdvisor/baseTradingMethod.js:232:10)
@John1231983 I am redoing your idea from scratch. I have started writing the BB.js and placing it inside the strategy/indicators. This is the code:
// no required indicators
// Bollinger Bands - Okibcn implementation 2018-01-02
var Indicator = function(BBSettings) {
this.input = 'price';
this.settings = BBSettings;
// Settings:
// TimePeriod: The amount of samples used for the average.
// NbDevUp: The distance in stdev of the upper band from the SMA.
// NbDevDn: The distance in stdev of the lower band from the SMA.
this.prices = [];
this.sqdiffs = [];
this.age = 0;
this.sum = 0;
this.sumsq = 0;
this.upper = 0;
this.middle = 0;
this.lower = 0;
}
Indicator.prototype.update = function(price) {
var tail = this.prices[this.age] || 0; // oldest price in window
var sqdiffsTail = this.sqdiffs[this.age] || 0; // oldest average in window
this.prices[this.age] = price;
this.sum += price - tail;
this.middle = this.sum / this.prices.length; // SMA value
this.sqdiffs[this.age] = ( price - this.middle ) ** 2;
this.sumsq += this.sqdiffs[this.age] - sqdiffsTail;
var stdev = Math.sqrt(this.sumsq) / this.prices.length;
this.upper = this.middle + this.settings.NbDevUp * stdev;
this.lower = this.middle - this.settings.NbDevDn * stdev;
this.age = (this.age + 1) % this.settings.TimePeriod
}
module.exports = Indicator;
Now I am working on implementing the strategy.
Good. Please share your strategy when it completed
@okibcn also interested in this! I can help testing it
@John1231983 @okonon I have created a pull with the three required files for the BB:
-the indicator
-the strategy and
-the config file
You can find the pull with the three files here: https://github.com/askmike/gekko/pull/1623 It depends on @askmike to include it in the main or devel release.
The Strategy is very basic, it advices long (buy) when entering the BBand from below and it advices short (sell) when entering the band from above. The default BBand uses a window of 20 candles and the distance from the average to the up and down bands is 2 standard deviations.
Let me know your experiments. With narrow bands it is more profitable to reverse the short and long signals. I am thinking in including that special condition in the strategy. What do you think?
@okibcn: Great to see your result. However, I think we need to consider MACD also because BB may not enough. The MACD rule as:
-Sell: Downtrend and has intersection between buy and sell
-Buy: Uptrend and has intersection between buy and sell
Do you think so
@John1231983 Next step will be to add MACD as a joint strategy file and then also RSI. However, when adding all three as a requirement, then it is going to be very difficult to have a buy or sell advice.
@okibcn : You are right. However, we have a safe trading :D
Hi is this strat available? if yes i want to test it with GekkoGA and might able to help whats the fit config any parameters need?
@okibcn This looks great, but I get errors when I try to run your code. See my comment here:
https://github.com/askmike/gekko/pull/1623
Any ideas? Thanks for doing this!
Hello I have simple strategy I think, 2 MACD merged.
Could you script 2 MACD in 1 strat?
https://uk.tradingview.com/x/gZvd9tzF/
2018-02-07 17:39:13 (INFO): Setting up Gekko in backtest mode
2018-02-07 17:39:13 (INFO):
2018-02-07 17:39:13 (INFO): Setting up:
2018-02-07 17:39:13 (INFO): Trading Advisor
2018-02-07 17:39:13 (INFO): Calculate trading advice
2018-02-07 17:39:13 (INFO): Using the strategy: StochRSI_MACD
xxx POST /api/backtest 500 185ms -
Error: non-error thrown: Child process has died.
at Object.onerror (/Users/avi/Documents/gekko/node_modules/koa/lib/context.js:105:40)
at
at process._tickCallback (internal/process/next_tick.js:160:7)
I am getting this error on running this script. Can someone help ?
Hello,
I need 2 strategies to implement in Gekko :
1) BB + RSI + MACD:
• Buy decision must satisfy three conditions:
• Sell decision must satisfy three conditions:
• Additional Parameters :
2) 2 MA + SAR + RSI :
• Buy decision must satisfy three conditions:
• Sell decision must satisfy three conditions:
• Additional Parameters :
I had made this strategy running with few improvements i will sell you the filles contact me
@seif12 how much for the files?
@seif12 Which strategy exactly ? The ones described by avi123r or the original one by John1231983 ? I am very interested in these strats!
Hi guys,
I'm trying to get StochRSI_MACD.js running as the example in this post, I can run the script (using ui for backtesting), the script is working wihtout errors, but I noticed that I get only 0.00000 value for BBands (whatever the parameters I choose)..
Gab0 tells to configur /baseTradingMethod.js, but I do not understand if I have to and really where I have to put the config if it is needed..
Could someone help me, please? I miss something.
2018-02-14 18:57:00 (DEBUG): calculated MACD properties for candle:
2018-02-14 18:57:00 (DEBUG): short: 951.44097649
2018-02-14 18:57:00 (DEBUG): long: 944.54744487
2018-02-14 18:57:00 (DEBUG): macd: 6.89353162
2018-02-14 18:57:00 (DEBUG): signal: 3.83320967
2018-02-14 18:57:00 (DEBUG): macdiff: 3.06032195
2018-02-14 18:57:00 (DEBUG): BB.lower: 0.00000000
2018-02-14 18:57:00 (DEBUG): BB.middle: 0.00000000
2018-02-14 18:57:00 (DEBUG): BB.upper: 0.00000000
2018-02-14 18:57:00 (DEBUG): price 970.10000024
2018-02-14 18:57:00 (DEBUG): BBsaysBUY
2018-02-14 18:57:00 (DEBUG): MACDsaysBUY
2018-02-14 18:57:00 (DEBUG): StochRSIsaysSELL
Hello, I solved my the issue of null values from BB. adding this.input = 'price'; to the BB.js
Hello
I'm trying to calculate Bolinger Bands, MACD and S-RSI with .Net using TA-Lib.
My problem is when i compared my results with Binance charts, it looks different. I'm getting last 500 candlesticks for every symbol and calculating with their last prices. My time interval period is 1 minute.
Am i doing something wrong?
Thanks
@okibcn
I could be wrong, but based off your calculation you are square rooting the sum of your deviations before dividing by the length. Yet, based off of the website below... You need to divide the sums first, and then square root the result.
var stdev = Math.sqrt(this.sumsq) / this.prices.length;
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:standard_deviation_volatility
@nexisme
Utilize the below to check the times and UTC match up. I noticed my UTC was set differently on gekko then the charts I was comparing against.
log.debug(candle.start.toString(), ' MACD: ', *yourmacdvariable*)
Hi Guys, I need an advise.
What do you think having 3 stragies on the same market with 'combined' pairs, eg:
USDT/ETH, USDT/BTC, BTC/ETH.. meaning that trade bot will switch between USDT/ETH/BTC following the strategies.. Is that a good idea? I don't see if it can lead to conflit..
Thanks in advance.
hey guy can anyone please help ?
i used this strategy that you have develop here . Below is the out put
2018-02-21 12:56:00 (DEBUG): Requested XRP/BTC trade data from Binance ...
2018-02-21 12:56:01 (DEBUG): Processing 29 new trades. From 2018-02-21 11:55:41 UTC to 2018-02-21 11:56:00 UTC. (a few seconds)
2018-02-21 12:56:01 (DEBUG): calculated StochRSI properties for candle:
2018-02-21 12:56:01 (DEBUG): rsi: 38.23226466
2018-02-21 12:56:01 (DEBUG): StochRSI min: 0.00000000
2018-02-21 12:56:01 (DEBUG): StochRSI max: 48.93617021
2018-02-21 12:56:01 (DEBUG): StochRSI Value: 78.13
2018-02-21 12:56:01 (DEBUG): calculated MACD properties for candle:
2018-02-21 12:56:01 (DEBUG): short: 0.00009263
2018-02-21 12:56:01 (DEBUG): long: 0.00009264
2018-02-21 12:56:01 (DEBUG): macd: -0.00000002
2018-02-21 12:56:01 (DEBUG): signal: -0.00000000
2018-02-21 12:56:01 (DEBUG): macdiff: -0.00000002
2018-02-21 12:56:01 (DEBUG): BB.lower: 0.00009254
2018-02-21 12:56:01 (DEBUG): BB.middle: 0.00009266
2018-02-21 12:56:01 (DEBUG): BB.upper: 0.00009277
2018-02-21 12:56:01 (DEBUG): price 0.00009252
2018-02-21 12:56:01 (DEBUG): BBsaysSELL
2018-02-21 12:56:01 (DEBUG): In no trend
2018-02-21 12:56:20 (DEBUG): Requested XRP/BTC trade data from Binance ...
How do i make it trade now ? because it seems like its just giving output on the shell .
Am i missing something ? Please help .
Thanks so much
@mseewooth
copy sample-config.js config.js
Configure the config.js
https://gekko.wizb.it/docs/commandline/tradebot.html#Configuration
Start it on the command line :
https://gekko.wizb.it/docs/commandline/about_the_commandline.html
and have patience. if 15 min candles, it takes 30+ min before you see something happen.
I would advice you to use Paper trader and not to start trading real money until paper trader has shown it works.
@Jabbaxx
thanks for helping man , i've already configured the config.js . Copying a the config.js again will overwrite the existing strategies ,well i can back up it,
Do you mean i used the default configuration ?
Keep the config you have. I think you are missing this :
config.paperTrader = {
enabled: true,
Alright so below is my configs :
CONFIGURING TRADING ADVICE
config.tradingAdvisor = {
enabled: true,
// method: 'MACD',
method: 'StochRSI_MACD_BB',
candleSize: 1,
historySize: 3,
adapter: 'sqlite'
}
STRATEGY
config.StochRSI_MACD_BB = {
interval: 14,
short: 12,
long: 26,
signal: 9,
bbands: {
TimePeriod: 20,
NbDevDn: 2,
NbDevUp: 2,
persistence_upper: 10,
persistence_lower: 10,
},
thresholds: {
low: 20,
high: 80,
down: -0.1,
up: 0.1,
persistence: 2
}
};
PLUGIN
config.paperTrader = {
enabled: true,
reportInCurrency: true,
simulationBalance: {
asset: 1,
currency: 100,
},
TRADER
config.trader = {
// enabled: false,
// key: '',
// secret: '',
// username: '', // your username, only required for specific exchanges.
// passphrase: '' // GDAX, requires a passphrase.
enabled: false,
key: 'Xxxx',
secret: 'xxxx,
username: '',
}
Please advise @Jabbaxx
Is there not missing what coins you want to trade ? But iun your outpout it looks ok.
You must start with a buy though, I only see a sell in your log ;)
Otherwise I can not see what is wrong. Maybe just have patience till it buys something ;)
Better start a new thread instead of hijacking this ;)
:) i'm trading DGB/BTC Binance.
Yeh, are you using this strategy ? Thats crazy if it takes that long to buy and then sell .. almost a month for a single trade :(
PLEASE
Tell me:
Is this code java script? Or is it embedded java?
Why is it so difficult to add code or is it?
Thanks
@Igi90 contact me mail root.[email protected] or telegram @seif12
@scubix avi123r first strategy with BB , rsi and macd i backtested this strategy is only profitable when in uptrend i have some ideas to make it profitable in downtrend
@seif12
Its easy to make a profitable strategy. The real question is how profitable?
@dmaxjm for me profitable mean that in a certain period running the strategy is better than simply holding i.e if i hold x amount in btc my strategy is profitable if in the same period i will end up with a balance equivalent to y > x in btc
@seif12 Higher than this? On BTC
Or this?
I got a few strategies.... I want a short term one. Most of mine end up being long term.
if you just hold during that period you would made 100% even with that big correction, but this one look great which one is it ?
Actually, if you look at the picture is 128% market.
Yeah , Nice one
I posted up in the other article giving advice on how to backtest multiple variables using python. Hoping someone out there has a good short term strategy in return. :-) Try checking the best trading strategy Poll in here.
Thanks link ?
@dmaxjm nice script dude can you help me use it to optimize this strategy i will share code with you
Sure. Send me an email @ [email protected]
@dmaxjm @seif12 is it possible to share the scripts, maybe as Gist, with the required parameter to run it?
@ John1231983 Hi, thanks for your work and also for make this thread.
Are you using your strat? Can you share us some test?
I want to use Gekko with this same strategy because it is one of my favs crypto-trading strategys. Really I do not know how to implement it on my system files, maybe someone can help us a little.
I can test and share some trading tips, I do not have knowledge on programming.
Thanks for everyone that helped in this thread. Good comunity!
@John1231983 @Gab0 thanks for your great work. It helped a lot!
Is there a simple way for running it from Gekko UI?
Thank you all for great ideas and strategies improvements.
Im still not able make it work. Would it be possible to include complete files to run this RSI/MACD/BB strategy here or send them on mail straight to me ??? pleaaaase
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.
Most helpful comment
@John1231983 @okonon I have created a pull with the three required files for the BB:
-the indicator
-the strategy and
-the config file
You can find the pull with the three files here: https://github.com/askmike/gekko/pull/1623 It depends on @askmike to include it in the main or devel release.
The Strategy is very basic, it advices long (buy) when entering the BBand from below and it advices short (sell) when entering the band from above. The default BBand uses a window of 20 candles and the distance from the average to the up and down bands is 2 standard deviations.
Let me know your experiments. With narrow bands it is more profitable to reverse the short and long signals. I am thinking in including that special condition in the strategy. What do you think?