Use date expiration parameter in OrderSend().
Parameters:
|
---|

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Something like this:
if okToBuy=true
{
here i would like to have my long stop pending order
}
if okToSell=true
{
here i would like to have my short stop pending order
}
Also if a new candle opens and the orders have not been triggered i would like them to imediately get canceled because on this candle i might need to issue 2 new orders at a different price.
I would be very greatful if someone could show me an example of how the code should be structured in order for me to achieve that.