I'm having difficulty determining how to set the BarsInProgress index for my setstoploss, and setprofittarget.
Unlike for ExitShort and ExitLong, the NT7 help doesn't show that I can specify a barsinprogress index for setstoploss and setprofittarget.
Could I accomplish this by ....
Say I'm on 60min MSFT and have added AAPL in initialize. I've got a position in MSFT and I want to exit using a stoploss that tracks AAPL price would this work when setting my stop:
if (BarsInProgress==1 //&& other sensible conditions)
{
SetStopLoss(blah blah $1 lower);
}
Would that stop then exit MSFT position if AAPL price hits the stop i define?
Thanks!
Comment