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:	99
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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X