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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    649 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    573 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    576 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X