pushkarnagle / gekko-buyatsellat

Simple strategy to buy and sell assets at pre-defined thresholds with Gekko
MIT License
53 stars 17 forks source link

Trailing stop loss #10

Open crytylus opened 6 years ago

crytylus commented 6 years ago

Hey. A trailing stop would be handy. Put highest price since buy as a variable and apply the stop loss to that price instead of the buy price. I need to learn coding urgently....

Saichovsky commented 6 years ago

@crytylus I made some modification to the strategy. It sets a profit limit and once the limit is reached, it doesn't stop there but keeps pushing the limit higher until the trend reverses. I now need to do the same for the stop loss limit... push it down as low as it can go. I got better results on backtest

https://github.com/Saichovsky/gekko/blob/master/strategies/saichovsky.js

Have a look @pushkarnagle . Still a work in progress though. Future plans include using the MACD indicator for detecting trend reversals. I just need to properly understand how the indicator works so I can see how to incorporate it.

Shahid7001 commented 6 years ago

@Saichovsky can you tell me please from where will it know the price of curreny i.e i havent set any price for buying or it will know the price once when we connect the exchange and buy a currency ourself please explain i am new to this platform and dont know much please thanks