Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Enter trade based off opening price of current daily price bar in relation to SMA

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

    Enter trade based off opening price of current daily price bar in relation to SMA

    I am trying to create a strategy where I enter a position either long or short on the opening of the stock market using the opening price and the daily chart. However, the issue I am having is that the logic that controls whether to go long or short is using the previous daily candles opening price to make a decision for today's trade. How do I configure the strategy to look at today's opening price? FYI, previous bars is set to 0.

    #2
    Hello magnolia318,

    Thank you for the post.

    Here is a post on the same subject where our colleague Chelsea demonstrates adding an additional 1 tick series to your script so you can access the opening value without needing to run the Strategy on each tick:



    Please let me know if you have any additional questions.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X