Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Position Sizing Strat

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Position Sizing Strat

    Hello,

    My strategy is fairly simple. I'm new to Ninjatrader but, I've been able to make this work for MT5 and tradeideas.

    Basically, I'm looking to create two order buttons (long/short) that send market orders. After clicking the button, the script will use ATR (1.25*ATR for stop and 2.5*ATR for target) to place my stop and target orders.

    To calculate order size, I'd like the script to look at my equity and calculate risk from the stoploss. For example, if my equity is $100k and my risk is at .25%, the script should adjust the position size to make my max loss on that trade $250.

    Ex.
    Current price = $1000
    Risk = .25%
    Equity = $100K
    ATR = 10

    Entry = $1000
    Stop = $987.5
    Target = $1025
    Position size = 20 shares = (Equity*Risk) / (Entry-Stop)

    Any notes on how I might be able to do this? It seems like it is not possible in ATM.

    Thanks!
    Last edited by Adabz; 01-30-2023, 01:37 PM.

    #2
    Hello Adabz,

    For both of these items you would need to manually code a strategy. There is a sample of adding buttons to a chart in the following link:



    You can see the ATR syntax here: https://ninjatrader.com/support/help...b=average+true

    To calculate the position size you would need to use variables and math for that. The platform doesn't have anything specific for calculating position sizing so how you are doing it by using math would be how to approach that.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    131 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X