Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MT4-type Hedge implementation?

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

    MT4-type Hedge implementation?

    I can program in VB, C, and even 86 assembly, but I may be too old to learn C#, or my MadCow may render me senile by the time I learn it. So, maybe you can save me the effort. I want to be able to convert a couple of EA's from MT4 to NT. There are a lot of examples here that will be very helpful, but I have found none that implement the 'hedge' capability of MT4. (They may be here somewhere. If so please point me at them.)

    I need to be able to hold several positions (some long, some short) in the same FX pair, with different stoploss and take profit levels for each position. I would prefer to send the SL and TP to the order server in case of disconnect, but that may depend on the order server.

    I'm sure that a competent C# programmer could handle this problem easily, but I'm not yet competent, so my question is, has anyone done this, and are they willing to share snippets of the code so I can learn? If not, does anyone have an estimate of how tough it will be to do?

    #2
    MadCow,

    From a single instance of a strategy you cannot be long and short at the same time. For hedging, you may need to run two separate strategies. We do have several 3rd party NinjaScript Consultants that you may want to try. Please find the list of them available here: http://www.ninjatrader.com/webnew/pa...injaScript.htm
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh. You have saved me a lot of time and effort.

      Comment


        #4
        Hi Josh

        Apologies for hijacking an old thread, but seeing as it is from 2009, I thought I would ask if this form of hedging is still not possible in NT? And how about when one uses Advanced Trade Management?

        Thanks

        Comment


          #5
          You cannot open a true hedge position on NinjaTrader, in that you cannot have two positions on your live account.

          With the ATM, you can go long and short at the same time, which creates "virtual" positions that are tracked by your ATM Strategies. However please not that as far as your broker in concerned your live account is "flat".

          Here is how this is accomplished:

          Open 2 SuperDOMs and set them both to the same market
          Right click in on of the SuperDOMs and select the menu "Properties"
          Set the 'ATM Strategy selection mode' parameter to "DisplaySelectedAtmStrategyOnly"
          Repeat the last two instructions on the second SuperDOM
          Submit a buy order to open a long position in the first SuperDOM
          Submit a sell order to open a short position in the second SuperDOM

          In addition to these instructions, I suggest reviewing the content available in our Online Help Guide specific to this topic:

          MatthewNinjaTrader Product Management

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by maybeimnotrader, Yesterday, 05:46 PM
          3 responses
          23 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by adeelshahzad, Today, 03:54 AM
          5 responses
          32 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by stafe, 04-15-2024, 08:34 PM
          7 responses
          32 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by merzo, 06-25-2023, 02:19 AM
          10 responses
          823 views
          1 like
          Last Post NinjaTrader_ChristopherJ  
          Started by frankthearm, Today, 09:08 AM
          5 responses
          22 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Working...
          X