The formula as provided assumes 1 contract.
I'm not familiar enough with forex. I mean, I have never traded currency pairs at all, so I have no idea with regards to forex what 'PointValue' means in that world.
I've never used NinjaTrader for stocks either, so I'm not exactly sure what 'PointValue' means for stocks. However, I suspect for all stocks the PointValue would be the same, that is, I assume it would be PointValue=$1.
To modify the formula to take into account number of contracts, just work through some examples, use CL or TF where each tick is $10 and the math is easy,
1 contract long CL at $60 with $400 max loss means 40 tick stop loss.
2 contracts long CL at $60 with $400 max loss means 20 tick stop loss.
Thus,
StopPrice = Position.AvgPrice - (MaxLossCurrency/PointValue)/Quantity
Using our running example of entry price = $60, to maintain a 40 tick stop loss on 2 long CL contracts, you'd have to set your max loss to $800,
StopPrice => 60 - (800/1000)/2 => 60 - .80/2 => 60 - .40 => 59.60
It's just simple math, but working it out with pencil & paper can help.
Btw, if you always think in terms of ticks for a stop loss, you can (for most purposes) ignore quantity. That is, assume 40 tick stop loss is your "room to roam" for CL ... and you think in those terms. Your "room to roam" thinking is not impacted by number of contracts, you always enter '40' in for stop loss and you do the math IN YOUR HEAD if you have Quantity > 1. (Or have your strategy print to the output window that 40 ticks * quantity = max loss in dollars, so you can see the $400 vs $800 max risk.)
Consider the markedly different approach if your "room to roam" thinking was done in dollars rather than ticks. If $400 is your max loss (aka your "room to roam") then you enter 400 into your strategy but enter 800 for 2 contracts, 1200 for 3 contracts -- so the math is no longer in your head but is surfaced immediately ... ok, but wait do you enter 400 and the let your strategy multiply it by Quantity automatically for you? Or do you have to enter 800, or 1200? Whatever, you'll have to decide.
My point is: this idea of stop loss as "room to roam" is better expressed as a tick thing, not a dollars thing.
I'm just saying that if you're doing too much of your thinking in dollars (rather than ticks) certain things can get a bit more complicated as you increase quantity. It's not a big deal, but I'm just saying, there are times when thinking in ticks is easier than thinking in dollars. In my opinion, figuring a StopPrice is one of those times (esp when Quantity > 1).

Comment