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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      181 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      334 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      258 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      358 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      187 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X