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 kujista, Yesterday, 12:39 AM
        2 responses
        14 views
        0 likes
        Last Post kujista
        by kujista
         
        Started by Austiner87, Yesterday, 11:24 AM
        2 responses
        12 views
        0 likes
        Last Post brucerobinson  
        Started by Rogers101, 05-05-2024, 11:30 AM
        3 responses
        21 views
        0 likes
        Last Post Rogers101  
        Started by nightstalker, 05-04-2024, 02:05 PM
        5 responses
        55 views
        1 like
        Last Post nightstalker  
        Started by MSerag, Yesterday, 11:52 PM
        0 responses
        11 views
        0 likes
        Last Post MSerag
        by MSerag
         
        Working...
        X