Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Max/Min of last 26 Bars

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

    Max/Min of last 26 Bars

    Hi im trying to create an indicator that displays me the highest or lowest value of the last 26 items.
    i tried it that way:

    But it always looks like that:
    Click image for larger version  Name:	Oszi.jpg Views:	1 Size:	125.6 KB ID:	1070725

    i dont know why it always jumps back to 0 instead od showing a proper line.

    Can you please help me? I spent about 6 hours trying to get it to work but im not able to^^
    Last edited by Branpo; 09-15-2019, 03:05 PM.

    #2
    Hi Branpo, thanks for your post.

    It looks like this is happening because your picking to fill values for Values[5] or Values[6] and not setting a value for each of them on every bar. Also, try zooming into the data on the y axis. Is the value actually 0 or is it some number close to 0? You can also Print out whatever cotDataList[i] is on every bar to see why its getting plotted this way. e.g. Print(cotDataList[i].Max); and Print(otDataList[i].Min);

    I look forward to hearing of your results.

    Comment


      #3
      Hi ChrisL,
      thank you for your fast reply!
      Attached Files
      Last edited by Branpo; 09-15-2019, 03:05 PM.

      Comment


        #4
        Hello Branpo, thanks for your reply.

        It seems to be a problem with the LINQ statement, but LINQ assistance is beyond the scope of support I can provide. From what I can see, it looks like using Min and Max are giving you one value for a whole week and that value is the same for each bar, causing the zig-zagging line, or something along those lines. I would be happy to run your code on my end. Just send the required materials to platformsupport at ninjatrader.com and reference "ATTN ChrisL 2275050". See here for instructions on Exporting.

        Best regards.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        80 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X