Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategy running on ES that sends orders to micro es

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

    strategy running on ES that sends orders to micro es

    Hi im trying to get my strategy that executes on the ES to place orders on micro es at the exact same time.

    Im finding a bit of a delay between the time the ES order is submitted and the MES

    in my code example below the main data series is the MES and ES would be the second data series. . My main ES strategy uses on bar close true.and im trying to make sure we ignore the primary MES data series to avoid delays.

    Any ideas why their is a delay when placing orders on MES ? and what is the best way to go about getting exact order timing for both markets?

    thanks,



    protected override void OnBarUpdate()
    {
    if (BarsInProgress != 0) - this is the MES chart
    return;

    if (BarsInProgress == 1) This is the ES chart
    return;

    if (CurrentBars[0] < 1
    || CurrentBars[1] < 1
    || CurrentBars[2] < 1
    || CurrentBars[3] < 1
    )

    return;

    #2
    use ES as the primary BarsArray[0] - and submit orders to the secondary MES? BarsArray[1]

    protected override void OnStateChange()
    {

    ....... if (State == State.Configure)
    {
    AddDataSeries("MES 09-19", Data.BarsPeriodType.Minute, 1, Data.MarketDataType.Last);
    }
    protected override void OnBarUpdate()
    {

    .......
    //do primary techncials and submit to secondary instrument added onInit
    if(BarsInProgress==0)
    {
    if (CurrentBar < BarsRequiredToTrade)
    return;

    if (CrossAbove(smaFast, smaSlow, 1))
    EnterLong(1,1,"L-MES");
    else if (CrossBelow(smaFast, smaSlow, 1))
    EnterShort(1,1,"S-MES");

    return;
    }

    //do stuff here for secondary MES

    }
    MicroTrends
    NinjaTrader Ecosystem Vendor - micro-trends.co.uk

    Comment


      #3
      "Any ideas why their is a delay when placing orders on MES ? and what is the best way to go about getting exact order timing for both markets?"
      The other way might be to link 2 parallel strategies master slave - and push the signal through from ES to MES - you can backtest the ES or MES with that you can backtest and only write 1 strategy but use it in 2 modes - Master or Slave... master calls Long/Short on Slave for example...

      more advanced
      fastest way - You can always just use the account object and bypass loading bars for MES - for example just run your rule son the ES - but copy the trades to the MES in realtime - cant backtest that though... and you might need to take care of the strategy trade man- also via account object

      MicroTrends
      NinjaTrader Ecosystem Vendor - micro-trends.co.uk

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      52 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X