Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with variables?

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

    Help with variables?

    My Question:
    I'm using NinjaScript to code a simple trading program for learning purposes. I'm attempting to create a variable, called 'Price1' for example, that starts at whatever price I enter in and then when the price of the stock reaches that variable price the variable than changes to a higher price which then becomes the sell point. How would I do this? More generally, how do I create variables to store changing prices for entry and exit?

    I've been attempting to do this for a few days now and I can't seem to figure it out. Thanks for any help.

    And I'm a beginning computer science major so I understand a decent amount about computer programming so I'm not a complete beginner on the subject.

    #2
    Welcome to our forums - have you looked at this sample below yet for working with user variables in our strategy wizard?

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    43 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    25 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    162 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    98 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    158 views
    2 likes
    Last Post CaptainJack  
    Working...
    X