Time a Position has been opened
maybe something like
// select order (lots of examples elsewhere) then
if(OrderOpenTime() - Time[0] > 3600 * kMaxOrderOpenHours)
OrderClose(...);
Can this be backtested?
maybe something like
// select order (lots of examples elsewhere) then
if(OrderOpenTime() - Time[0] > 3600 * kMaxOrderOpenHours)
OrderClose(...);
You agree to website policy and terms of use
I need help, to close positions after a certain amount of time has elapsed
Can anyone help with the code?
Thanks