PDA

View Full Version : From Entry Bar


silindas
01-26-2009, 09:42 AM
Can I SetStopLoss to some price in relation to the Entry Bar? For example, can I set my stoploss to 1 tick below the previous swing low? Or even just to 1 tick below the low of my entry bar? I can't seem to make the stoploss stick, it keeps recalculating through time.

Sorry if this is script 101, but I'm a beginner and I'm lost.

Silinda

NinjaTrader_Bertrand
01-26-2009, 09:50 AM
Hi silindas, welcome to the NinjaTrader support forums!

You can tie the Stoploss to your entry price by using Position.AvgPrice when calculating the value.

For a reference sample including code related to this question, please check this - http://www.ninjatrader-support2.com/vb/showthread.php?t=3222