Can Gekko make decisions based on purely OCHL?
#1
Smile 
I'm trying to set up my strategy so that it can buy when price is X amount of USDT above the previous candle's high and sell when price reaches my target, ex. my entry price + my target.

I don't want to use any indicators at all. Is it possible to make trades based on the previous candle's OCHL data and the current price?

Thanks.
  Reply
#2
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
  Reply
#3
(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.
  Reply
#4
Quote: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.

if you run your strategy with a candleSize of 5 minutes Gekko will feed it 5 minute candles. So this solves your first problem. As for daily candles:

The beauty of big candles is that you can build them if you have small ones: Gekko will give you 5 minute candles and you can aggregate them into daily candles, in your case you are only really interested in the highest high of all 5 minute candles of the day before. So you need to set up your strategy so it does a few things on every candle:

1. store the high in case it's higher than any other high of today.
2. check if the current high is higher than any high from yesterday (which you stored in step 1).

Quote: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?

if you want complex stop behavior just watch the price however you want inside your strategy and trigger the sell manually. Gekko's stop loss is a standard trailing stop that is simply helping strategies who want default behaviour. Everyone else can simply code their own stops inside their strategy.

Quote: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?

There are a lot of things within Gekko that happen in less than 1 minute intervals. But the market data your strategy receives is limited to candles, and the minimum candle size is 1 minute. Read this: https://gekko.wizb.it/docs/introduction/scope.html

Quote:I watched the video by the way, it was helpful, but I still have several questions about some things that weren't really covered.

Feel free to ask them!
  Reply
#5
Thankyou for sharing the data which is beneficial for me and others likewise to see. 먹튀검증커뮤니티
  Reply
#6
I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well! 먹튀검증
  Reply
#7
Extremely pleasant article, I appreciated perusing your post, exceptionally decent share, I need to twit this to my adherents. Much appreciated!. Visit / Website / Click here / sex dolls europe / visit website /
  Reply
#8
Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. sexdoll / sex dolls europe / click here / visit website / website /
  Reply
#9
Thanks for Nice and Informative Post. This article is really contains lot more information about This Topic. know more
  Reply
#10
Regular visits listed here are the easiest method to appreciate your energy, which is why why I am going to the website everyday, searching for new, interesting info. Many, thank you Small Claims Funnel
  Reply


Forum Jump:


Users browsing this thread: