Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Previous Day's High Error

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

    Previous Day's High Error

    Hello All-

    I added a line of code on line 99 and now I am getting the Error on calling 'OnBarUpdate' method on 276 error message when I try to enable the script. I added the Print(Made it to Line) code. In the Ninjascript Output Made it to line 88 prints but not Made it to line 99 so I know the issue is in Set 1.

    Before adding the code on line 99, the script worked fine. What I am trying to do is tell the script to trade only if the current bid is higher than the high of yesterday. I thought I would just say something like Current Bid > than High on the daily candle from 1 day ago.

    Please see the attached photo showing what I am talking about.

    Thank you,

    Nick Click image for larger version

Name:	Previous Day High.PNG
Views:	110
Size:	56.4 KB
ID:	1194337

    #2
    Hello njmeyer713,

    From the image it looks like you started using 1 BarsAgo on a secondary series but you are not currently checking that at least 1 bar has loaded first.

    Please try changing line 86 to read as < 1 instead of < 0, that will check that the current bar for that series has at least 1 bar.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    56 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    33 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    195 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    359 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    280 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X