Can you please help me? I have written my own strategy, where one of the parameters is as follows:
- Code: Select all
strategy.parameters:addString("ActiveTrade", "Active trade to apply on", "", "");
strategy.parameters:setFlag("ActiveTrade", core.FLAG_TRADE);
Now, how can I retrieve the selected trade's ID? I assume it is:
- Code: Select all
instance.parameters.ActiveTrade
...right?
Then finally, how can I see if it's a long or short trade? In other words, I need to determine if this trade is "Buy" or "Sell" so that I can reverse it.
Thanks, you guys are the best!
cyanidez