10-06-2018, 02:32 AM
(10-05-2018, 03:19 AM)askmike Wrote: Yes! It's not hard but you will need to create your own strategy for this. Have a look at this video, with that you should have enough to do this: https://youtu.be/6-74ZhrG0BE
I found this code on this forum that looks close to what I'm trying to achieve:
strat.check = function(candle) {
this.currentCandle = candle;
// use the current and previous one
if(this.currentCandle.close > this.previousCandle.high) { ... etc }
// call the current candle previous one so the next time
// the check function runs you can still access it
this.previousCandle = this.currentCandle;
}
-----------------------------------------------------------
So, what I need to do is on the smallest time frame (5 minutes for poloniex, right?) go long if current 5 minute candle high > previous DAILY candle's high, or else if it is not, do nothing until next 5 minute candle.
And then once in a trade, have a stop loss that is X USDT below the previous DAILY candle's high.
Then from then on, wait for my target/take profit to be met or to be stopped out. If neither occur by the end of the DAILY candle, then sell right away at current price. Then repeat process over again.
------------------------------------------------------------------------------------------------------------------
Does the stop loss have to be a trailing stop loss? and can you use price numbers (like 5.00 USDT below previous D candle high) instead of percentages?
Also, if the stop loss can check the market every X seconds, why does everything else in Gekko have to wait minimum 1 minute intervals before reading price?
I watched the video by the way, it was helpful, but I still have several questions about some things that weren't really covered.