Differents between this,advice() and this.advide('short') - 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: Differents between this,advice() and this.advide('short') (/thread-57561.html) |
Differents between this,advice() and this.advide('short') - ialberquilla - 08-14-2018 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! RE: Differents between this,advice() and this.advide('short') - askmike - 08-14-2018 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! RE: Differents between this,advice() and this.advide('short') - ialberquilla - 08-14-2018 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 RE: Differents between this,advice() and this.advide('short') - askmike - 08-14-2018 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. |