i have a strategy in which I would like to configure the stop, target and order just one time. This is because I only want to fire off one order ever during the running of the strategy. Since on OnBarUpdate runs frequently, it doesn’t seem to be The right place to launch my one limit order.
here is some pseudo code for what I want to do:
if (state == State.Configure) {
SetStopLoss(xxxx);
SetProfitTarget(xxxxx);
EnterLimitLong(xxxxxx);
}
that way my order is fired off when the strategy starts and waits to be filled, after which the stop and target orders manage the order. Am I doing this right?
thanks
john
Comment