• 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 saltminer, Today, 05:19 PM
    0 responses
    3 views
    0 likes
    Last Post saltminer  
    Started by martyn73, Today, 04:18 PM
    0 responses
    3 views
    0 likes
    Last Post martyn73  
    Started by aprendiz, Today, 03:42 PM
    0 responses
    4 views
    0 likes
    Last Post aprendiz  
    Started by 1001111, Today, 09:10 AM
    1 response
    19 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by usero86, Today, 06:02 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X