01-02-2019, 06:55 PM
Hi @askMike hi All,
first of all, thank you very much for developing this tool and making it available as open source! I really enjoy playing with it for the first few hours now!
Will definetly send you some beers through the BTC address you published when I have my first strategy up and running.
While implementing my first strategy, I have two specific questions where I haven't found any answer around:
1. Trailing Stop Loss: I would like to add a trailing stop loss to an existing 'long' advice/status. So the long advice has been given already and on a specific condition I would like to add a trailing stop loss to that.
The first long is called just like this:
Then on a specific condition (not relevant for the example here), I would like to add the trailing stop loss like this, by calling the 'long' advice again:
However, when I do this, the trailing stop loss does not work/execute! Is there another way how to add a trailing stop loss on an existing 'long' direction?
2. Trailing Stop Buy?
I would like to use a "trailing stop buy" kind of function (similar for example like the Stop Limit Buy on Binance). I would like to automatically execute a buy order as soon as the value goes up for 1% from the last candle for example. But I would not like to wait for the next full candle (15min in my case) but instead would like to execute the 'buy' based on the live price immediately (for example 1 or 2 min after the previous candle finished as the price went up 1% from that candle).
Can somebody give me a hint where/how I could approach this?
Many thanks in advance for help/replies!! :-)
Cheers, Darksta
first of all, thank you very much for developing this tool and making it available as open source! I really enjoy playing with it for the first few hours now!
Will definetly send you some beers through the BTC address you published when I have my first strategy up and running.
While implementing my first strategy, I have two specific questions where I haven't found any answer around:
1. Trailing Stop Loss: I would like to add a trailing stop loss to an existing 'long' advice/status. So the long advice has been given already and on a specific condition I would like to add a trailing stop loss to that.
The first long is called just like this:
Code:
this.advice({
direction: 'long',
});
Then on a specific condition (not relevant for the example here), I would like to add the trailing stop loss like this, by calling the 'long' advice again:
Code:
this.advice({
direction: 'long',
trigger: {
type: 'trailingStop',
trailPercentage: 0.4
}
});
However, when I do this, the trailing stop loss does not work/execute! Is there another way how to add a trailing stop loss on an existing 'long' direction?
2. Trailing Stop Buy?
I would like to use a "trailing stop buy" kind of function (similar for example like the Stop Limit Buy on Binance). I would like to automatically execute a buy order as soon as the value goes up for 1% from the last candle for example. But I would not like to wait for the next full candle (15min in my case) but instead would like to execute the 'buy' based on the live price immediately (for example 1 or 2 min after the previous candle finished as the price went up 1% from that candle).
Can somebody give me a hint where/how I could approach this?
Many thanks in advance for help/replies!! :-)
Cheers, Darksta