Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

trade by market with several instruments

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

    trade by market with several instruments

    Dear friends.
    I want to buy eur/usd by market, and buy gbp/usd by market, and may be some other instruments on the same bar. How can I do that? I find on a help file sample of code for Litim orders. EnterLongLimit(1, true, 1, Lows[1][0], "AAPL Order");
    But I need market execution for 3-4 several instrument at the same bar.

    #2
    Daglas,

    To submit market orders use:
    EnterLong();
    EnterShort();

    Market orders don't change the timing of orders placed historically or in a backtest. Conditions are evaluated on bar close and submitted to the next bar following the condition.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_RyanM View Post
      Daglas,

      To submit market orders use:
      EnterLong();
      EnterShort();
      But how can I submit market orders on several instruments in one multi currncy strategy?
      I use EnterLong();/EnterShort(); for one instrument, but how I can sell (for example)
      usd/jpy, usd/chf, usd/cad into one bar into one strategy?
      For example
      if (a>b)
      {
      //sell , usd/chf,
      //sell usd/cad
      //sell usd/jpy


      }

      Comment


        #4
        You need the overload that allows you to place orders to a specific BarsInProgress. Then submit to series 0, 1, 2, etc.

        EnterLong(int barsInProgressIndex, int quantity, string signalName)

        Last edited by NinjaTrader_RyanM1; 04-04-2011, 01:37 PM.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CortexZenUSA, Today, 12:53 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by usazencortex, Today, 12:43 AM
        0 responses
        5 views
        0 likes
        Last Post usazencortex  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        168 responses
        2,265 views
        0 likes
        Last Post sidlercom80  
        Started by Barry Milan, Yesterday, 10:35 PM
        3 responses
        11 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X