Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

how to set a quantity to buy?

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

    how to set a quantity to buy?

    Hi i am using the strategy builder and how can i set a quantity standard like this: i am having $1000 as my budget and i want to use up the 1000 dollars, round to the most shares i can buy?
    in other words the system will calculate the correct quantity to buy by itself by exhaust the $1000 to the most. how can i code this strategy? i tried to put 1000/GetCurrentBid() into the strategy builder but it cannot recognize it. Please help me out! Thanks!!!!!!

    #2
    Hi light7801, unfortunately this is not directly supported in the wizard, you could calculate the position size needed via custom coding in NinjaScript.

    For an approximation of working based on margin / account size settings, you can use the 'ByAccountSize' mode to determine order qty -

    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by zstheorist, Today, 07:52 PM
    0 responses
    3 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    149 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post tkaboris  
    Working...
    X