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 kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      28 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      17 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      26 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      24 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      139 views
      0 likes
      Last Post SalmaTrader  
      Working...
      X