Help with Trailing SL - 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: Help with Trailing SL (/thread-57343.html) Pages:
1
2
|
Help with Trailing SL - Kris191 - 07-12-2018 Hi all, I want to add a trailing stoploss into a strat i have the code for both but no idea how to being them together, any tips? Thanks RE: Help with Trailing SL - Kris191 - 07-16-2018 Anyone able to help? RE: Help with Trailing SL - askmike - 07-17-2018 There are some guides on the forum regarding stop losses, but if you are not that comfortable it is probably better to wait until we get native stop losses added, see here: https://forum.gekko.wizb.it/thread-57314.html RE: Help with Trailing SL - Kris191 - 07-17-2018 (07-17-2018, 03:06 AM)askmike Wrote: There are some guides on the forum regarding stop losses, but if you are not that comfortable it is probably better to wait until we get native stop losses added, see here: https://forum.gekko.wizb.it/thread-57314.html Well i tried to put the trailing stop loss into the strat and if im honest it looks good to me but the computer says no!! Anyone albe to tell me whats wrong with this?? Code: // Source: https://raw.githubusercontent.com/vrfurl/gekko/stable/strategies/DEMACrossover.js RE: Help with Trailing SL - crypto49er - 07-18-2018 @Kris191, Are you getting an error message or is the trailing stop loss not working at all? RE: Help with Trailing SL - mark.sch - 07-18-2018 @crypto49er Keep on publishing your Gekko videos on youtube, I like, great work :-D What is left on your crypto gameplan? RE: Help with Trailing SL - Kris191 - 07-18-2018 (07-18-2018, 07:09 PM)crypto49er Wrote: @Kris191, Just not working, I've found a TEMA strat i'm going to try and re config, so watch this space. RE: Help with Trailing SL - Kris191 - 07-19-2018 So can someone advise on this please. I want the follwoing to happen: Buy when medium crosses above the long Sell when medium crosses below the long Sell when the short crosses below the medium but medium is still above the long Buy when the short crosses above the medium but the medium is still above the long code currently is: Code: if((short > medium) && (medium > long)) { I think its almost there but can some one help me?? Also how do i add console notifications in this saying buy and sell. thanks RE: Help with Trailing SL - crypto49er - 07-20-2018 @mark.sch, Thanks! Appreciate it. I got the basics of Zappra's communicate with Gekko via Telegram working. Will try to have a video out today. Other than that, still looking into ways to have Gekko trade with a specific starting amount and have that amount go up/down based on the sell so I can run multiple gekko off the same API key for an exchange. I know AskMike has implemented the base for this in 0.6 but it isn't working yet. @Kris191, I will drop the "else" and just use a bunch of if statements. It just makes things more confusing. You can also use "switch" instead of if statements since you have two conditions that will trigger a sell for cleaner code. Just add log.info('message') within the if brackets to get the console notifications. Then just find time frames in backtest data that will trigger each of these if statements to confirm if they are working as you need it. RE: Help with Trailing SL - Kris191 - 07-22-2018 (07-20-2018, 05:32 PM)crypto49er Wrote: @mark.sch, wow thats just confused me more lol i need to learn some code as i back tested the strat and it didnt trigger a sell or buy |