• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculate number of shares with Strategy builder

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

    Calculate number of shares with Strategy builder

    I am trying to set the number of shares traded in a strategy based on $5000 position size. I would like to do this with the strategy builder

    I set a variable "Shares" to integer

    In the condition tab I have
    Position.MarketPosition=MarketPosition.Flat

    In the action box I am trying set Shares = 5000/Close[0];

    Using the strategy builder I am able to go under Misc - Set Shares
    but I can only set the Shares = Close[0]/5000; which is the opposite calculation I need

    Is there anyway to create this equation in the strategy builder

    Thank you

    Stefan

    #2
    Hello sdauteuil,

    Thank you for your reply.

    There would not be a way to set up this calculation in the Strategy Builder as it's not designed to handle much in the way of calculation. You'd need to unlock the code and manually add this logic.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by learningnt, Yesterday, 10:21 PM
    0 responses
    2 views
    0 likes
    Last Post learningnt  
    Started by GMiller64, Yesterday, 01:13 PM
    3 responses
    10 views
    0 likes
    Last Post GMiller64  
    Started by itrader46, Yesterday, 12:51 PM
    5 responses
    43 views
    0 likes
    Last Post rithikanth  
    Started by hemlock, Yesterday, 11:45 AM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by gbulle, Yesterday, 11:31 AM
    4 responses
    12 views
    0 likes
    Last Post gbulle
    by gbulle
     
    Working...
    X