Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 AddDataSeries get TickSize from onStateChange

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

    NT8 AddDataSeries get TickSize from onStateChange

    Can I get the tick size for a data series I have added in the onStateChange, State.Configure area?

    For example:

    Code:
    AddDataSeries("EURUSD", (BarsPeriodType)15, 1, Data.MarketDataType.Last);
    someVariable = BarsArray[1].Instrument.MasterInstrument.TickSize;
    BarsArray[1] is not yet set at this point, is there some other way to access tick size at this point for the added data series?

    #2
    Looks like the BarsArray[1].Instrument.MasterInstrument.TickSize only relates to the primary instrument (makes sense based on the verbiage). So how do we access the added data series tick size in either the onStatusChange or the onBarUpdate
    Last edited by fxRichard; 06-26-2016, 05:03 PM.

    Comment


      #3
      Hello fxRichard

      Thanks for your posts.

      The TickSize will be available by BarsInProgress. For example:
      Code:
      			else if (State == State.Configure)
      			{
      				AddDataSeries("EURUSD", BarsPeriodType.Minute, 1, Data.MarketDataType.Last);
      			}
      		}
      
      		protected override void OnBarUpdate()
      		{
      
      			if (BarsInProgress == 0 && doitonce1)
      			{
      				Print ("BIP0 TickSize: "+TickSize);
      				doitonce1 = false;
      			}
      			
      			if (BarsInProgress == 1 && doitonce2)
      			{
      				Print ("BIP1 TickSize: "+TickSize);
      				doitonce2 = false;
      			}
      With BIP0 = ES 09-16 and BIP1 = EURUSD :
      BIP0 TickSize: 0.25
      BIP1 TickSize: 1E-05

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      577 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X