Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Value of previous Indicator-Value

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

    Value of previous Indicator-Value

    I have written a custom indi, working well.
    No i would like to write a second one, based on the first.
    The code below works fine and the Line of the orig is drawn.
    My Problem: I need the Value of the previous Bar but
    Code:
    [FONT=Courier New]  [COLOR=#0000ff]double[/COLOR][FONT=Courier New][SIZE=2] val = [/SIZE][/FONT]MyCustomIndi(var)[[SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][SIZE=2]];[/SIZE][/FONT]
    doesn't work.
    Anybody knows about the problem?
    Thx in advance
    Chris

    Code:
    [FONT=Courier New][SIZE=2]
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]protected[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]override[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] OnBarUpdate()
    {
    [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff]  double[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] val = MyCustomIndi(var)[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]];
    [/SIZE][/FONT][FONT=Courier New][SIZE=2]   Line.Set(val); 
    [/SIZE][/FONT][FONT=Courier New][COLOR=#008000][/COLOR][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000]
    [/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]}
    [/SIZE][/FONT]

    #2
    The problem you are facing is explained in the following tip - http://www.ninjatrader-support.com/v...ead.php?t=3170
    RayNinjaTrader Customer Service

    Comment


      #3
      Thx!
      Sorry my question was stupid

      Comment


        #4
        No problem at all...Not a stupid question..That's why we created a tip for it, many people run into this.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        939 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        7 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by rocketman7, Today, 01:00 AM
        0 responses
        4 views
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        28 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        33 views
        0 likes
        Last Post wzgy0920  
        Working...
        X