Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems accessing TickSize

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

    Problems accessing TickSize

    Hi,

    When I try to access TickSize in Initialize method, using for instance
    Code:
    Print(TickSize)
    I get exception

    "Failed to call method 'Initialize' for indicator 'xx': 'BarsInProgress' property can not be accessed from within 'Initialize' method"

    #2
    Originally posted by gomifromparis View Post
    Hi,

    When I try to access TickSize in Initialize method, using for instance
    Code:
    Print(TickSize)
    I get exception

    "Failed to call method 'Initialize' for indicator 'xx': 'BarsInProgress' property can not be accessed from within 'Initialize' method"
    This is due to a changed implementation to accomodate multi-series strategies.. You could try something like this:

    Code:
    [FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] (Instrument != [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
    [SIZE=2][FONT=Courier New]    Print(Instrument.MasterInstrument.TickSize);[/FONT][/SIZE]
    [/SIZE][/FONT]
    RayNinjaTrader Customer Service

    Comment


      #3
      thanks, it works.

      Comment

      Latest Posts

      Collapse

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