AveragePrice and calculation
08.06.2020 07.54

Algorithmic Trading with NinjaTrader

Frank

if (Close[0] <= Position.AveragePrice - TickSize * StopLossValue)


? 1, what is the value of Position.AveragePrice ?

** is it the current price on the market for the position i'm holding ?


? 2, what is the value of the TickSize ?

** is it a number like 0,5 for example ?


? 3, whx to multiply here with StopLossValue ?

** is it to convert the TickSize to a market price ?


  • Yuri Zolotarev
    08.06.2020 10:16

    - Position.AveragePrice is average entry price

    - TickSize value is set inside NinjaTrader settings for each instrument individually eg. for ES it is 0.25

    - You multiply by stop value because you need to convert ticks to points