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

Current Price

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

    Current Price

    Hi All,

    I'm trying to get my strategy to execute a market order when a certain price level gets hit. I've been using High[0] or Low[0] to get that price level, but that presents some problems I want to avoid when CalculateOnBarClose = False. My question is, what command can I use to tell the script what the current price is on the next incoming tick?

    Thank you in advance for your assistance!!!

    #2
    Problem Solved

    As I was writing my original post, it occurred to me that if CalculateOnBarClose = False, then the system had to assign a value to Close[0] and the logical value would be the last trade price. Assuming that, I changed my script and it worked like a charm!

    Hope this helps someone else in the future!!!

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by FAQtrader, 04-25-2024, 12:00 PM
    6 responses
    94 views
    0 likes
    Last Post blkbird
    by blkbird
     
    Started by bee1943, Today, 09:55 AM
    0 responses
    3 views
    0 likes
    Last Post bee1943
    by bee1943
     
    Started by giulyko00, Yesterday, 11:49 AM
    4 responses
    24 views
    0 likes
    Last Post giulyko00  
    Started by NUVERSA, Today, 09:31 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by rene69851, 05-02-2024, 03:25 PM
    2 responses
    29 views
    0 likes
    Last Post NinjaTrader_Kimberly  
    Working...
    X