BBands strategy idea - 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: BBands strategy idea (/thread-1520.html) |
BBands strategy idea - mhmdalsaqqal - 02-20-2018 i using this strategy and its always work using the BB indicator , LTC\USTD , 1 min chart . i choose the last price that the candle touch the lower BB line , and open buy order and wait the price to come down to it , then when the buy already done , i see where BB upper line where and open sell order and wait while the price go up . so the code have to check when the price hit the lower bb line to buy , then save the upper bb band on that point , then when the if ( price = upper bb for the previous buying price) { sell ; } im sorry about my bad english . this strategy always work for me , the problem is i dont know how to automate it . see the attachment pic , you will understand RE: BBands strategy idea - ManuManu - 02-20-2018 Hey, I tried something quick, and come with this code : BBandCheck.js : Code: /* You also need a toml config file for settings : ( I tried the fisrt values google returned me, not sure at all what are the best values : ) BBandCheck.toml : Code: # BBand Params : I tried to backtest it, and it works some times, BUT : * if you go long, and the asset is then going down, you can reach this situation where you will never going short again, and just loose. * the other point is that I'm not sure how good Gekko is for 1 minute trading. I'm not sure how it's working, and AskMike or anyone with more experience could you more, but I have the feeling that with 1 minute candle, your real buy price can be different from the price the strategy was thinking, and so be loosing from this. Tell us what your experience is with this strategy !! Any comment on the code also appreciated ( as it's kind of my first own strategy coding ) ManuManu RE: BBands strategy idea - ManuManu - 02-20-2018 And, by the way, I tried to add a stop loss, but, as always, it's even worse : When the trend is goind down, the stop loss will sold the position, then the strat will buy another time, and so on. So basically, you're loosing ManuManu RE: BBands strategy idea - tommiehansen - 02-21-2018 (02-20-2018, 07:05 PM)ManuManu Wrote: And, by the way, I tried to add a stop loss, but, as always, it's even worse : Just a friendly heads up: Note that by reusing my code without attribution and claiming the entire thing as your own you are breaking the CC-BY-SA 4.0 license attached to it. Something that is illegal. As the license state you are free to use, remix and build upon the work but you can't claim authorship of the entire code base and you can't leave out the original author. The CC-BY-SA 4.0 is very clear. RE: BBands strategy idea - ManuManu - 02-21-2018 ooppss.. Sorry Tommie, I obviously started with your Bull/Bear strat, and just changed the header without really thinking about it ( and by the way, I didn't put a real name in the copyright part ). I will change that ( also I'm not sure what is the correct way to change that, tell me if my change is ok for you ) ManuManu |