Differents between this,advice() and this.advide('short')
#1
Hi,

I want to implement my first strategy in Gekko, I was reading the documentation and looking into the code of other strategies to learn of it, buy I have a doubt.

I want to create a strategy to buy a position at a value of RSI, in this moment, I will trigger will this.advice('long'), and I want to sell this position in a determinate price, so when the prices is above this level, How can I sell this position? this.advice() or this,advice('short')

What is this.advice() used for?

Thanks for your help!
  Reply
#2
Quote:What is this.advice() used for?

This is how your strategy tells Gekko what to do:

- If you fire a `this.advice('long')` Gekko will buy.
- if you fire a `this.advice('short')` Gekko will sell.

Quote:I want to create a strategy to buy a position at a value of RSI, in this moment, I will trigger will this.advice('long')

Yep!

Quote:and I want to sell this position in a determinate price, so when the prices is above this level, How can I sell this position? this.advice() or this,advice('short')

The latter!
  Reply
#3
Thanks, but, then Why some strategys are using only this.advice() (without parameters) What is the purpose? For example in RSIStoploss strategy there are some

else{
this.advice();

Do you know the porpouse?

Thanks
  Reply
#4
That's very old code, years ago there used to be something called "soft advice", it has been deprecated for a long time and Gekko will ignore those.

Thanks for bringing it to my attention, I will clean that up soon.
  Reply


Forum Jump:


Users browsing this thread: