Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buy at the close of Range bar

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

    Buy at the close of Range bar

    Hi

    I'm trying to develop an ninja strategy where it buys at the close of up range bar. i will manually ensure other conditions are met but when i do decide to buy i want to let the system buy it at close of range bar(the reseason i want to automate the buy order is by the time i manually calculate the close price of range bar and place the order, the price is already moved to next range bar.)

    i wrote a condition Close(0)>open(0) then go long limit at close with profit target of 10. once i activate this strategy the system is giong back in time and making sure last trade(which would have taken at last up bar) has met the profit target, if not then its not taking any trading at the present. i dont want this to happen, i just want it to look at only from current bar and disregard previous bars or trades.

    Please help.

    THanks
    Chak.

    #2
    Chak, thanks for the post here - you can put if (Historical) return at your OnBarUpdate() start for the strategy. It would then only evaluate any conditions from the point of enabled / seeing realtime data onwards.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    56 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    160 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    96 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X