Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

esignal

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

    esignal

    Hi

    I have an esignal efs strategy that I would like to trial as an automated strategy.

    Can you please let me know of where I can see some examples or information on how to go about formating my efs so that it integrates with Ninja Trader.

    The simpler the strategy the better for now as I am new to all this.

    Just an entry and exit would be great

    Thanks in advance

    Trixi

    #2
    Hello Trixi,

    Unfortunately, we do not provide specific examples in regards to translating eSignal strategies into NinjaScript.

    However, you can find more information about automated strategies created using NinjaScript (C#) at the links below.




    JasonNinjaTrader Customer Service

    Comment


      #3
      Thanks for that but what I really wanted is just to allow my efs to communicate to Ninja when to buy and sell etc (rather then rewriting the whole thing into NinjaScript)

      I found the esignal sample code and downloaded that to esignal.
      It is obviously communicating to esignal as it was returning correct values forthe RealisedPnL but all other values were 0.

      Any ideas as to what I need to change to make it send orders?

      Trixi

      Comment


        #4
        The following section of our Help Guide is relevant for what you wish to do.

        Automated Trading > Automated Trading Interface > eSignal Integration

        In the folder

        C:\Program Files\NinjaTrader 6.5\bin\AutoTrade

        There is a NTSample.EFS file that you can load into eSignal which is the only example we provide.
        RayNinjaTrader Customer Service

        Comment


          #5
          Thanks Ray

          I found the esignal sample code and downloaded that to esignal.
          It is obviously communicating to esignal as it was returning correct values forthe RealisedPnL and all other values were 0, but it is not sending any orders to Ninja Trader.

          Is there something special that I need to do to set this up?
          I have read the relevant places in the help guide as per your post but it hasn't shead any light to what might be wrong.

          Any help to get this sample code working would be greatly appreciated as I'm sure that once I have something to work off that I will be able to adapt it to my needs.

          Regards

          Trixi

          Comment


            #6
            You would need to check your logs to see what errror messages show up. Ultimately, you will have to review our function list and play around to see how things work. We have no further reference samples available.
            RayNinjaTrader Customer Service

            Comment


              #7
              There are no function errors coming up in the log. Would there be anything else that I should be doing before I try playing with the functions? Surely Ninja Trader wouldn't put the only sample that they have a faulty one? It is in the help file too. Wouldn't someone check this before it is published?

              Otherwise do you guys help out with coding or only other less specific questions?

              Thanks

              Comment


                #8
                It works here as expected. Try hard coding an instrument such as "ES 12-08" for the symbol in the function. In any case, you will have to play around with it.
                RayNinjaTrader Customer Service

                Comment


                  #9
                  Ok Sorry, I am obviously very new to this!! I now have some log output data for you to look at:
                  Log output before making any changes (ES #F is the instrument that I have up in esignal with NTSample loaded. Esignal returns PnL correctly, AvgEntryPrice empty and all other values 0)

                  10/15/2008 8:24:33 PM ATI OIF, 'Place;;ES #F;Buy;1;Market;0;0;;;MyOrderId;;' holds unknown instrument 'ES #F'

                  I changed all the getSymbol() to getSymbol("ES 12-08") but it didn't make any difference so how do I hard code this instrument? I can't see anywhere in the efs that this has been done with any other instrument that I can change.

                  Thanks for your time
                  Trixi

                  Comment


                    #10
                    Nevermind I have it sorted! So far anyway Thanks for all your help.

                    Comment


                      #11
                      I have another question now

                      When I use

                      NTMarketPosition("")

                      It returns a number that indicates how many open positions I am currently holding. Is it possible to get a function that returns long, short or flat and lets me know what direction the positions are in rather then how many?

                      I have it in the code like this:

                      preMain()

                      dll.addFunction("MarketPosition", DLL.INT, DLL.STDCALL, "MarketPosition", DLL.STRING, DLL.STRING);

                      Main()

                      if (NTMarketPosition("") == NTMarketPosition.Flat);
                      {debugPrintln("Flat");}
                      if (NTMarketPosition("") == NTMarketPosition.Long);
                      {debugPrintln("Long");}
                      if (NTMarketPosition("") == NTMarketPosition.Short);
                      {debugPrintln("Short");}
                      debugPrintln("Position size1: " + NTMarketPosition(""))

                      postMain

                      function NTMarketPosition(account) {
                      return dll.call("MarketPosition", "ES 12-08", "");}

                      No matter what position I'm holding it returns long, short and flat into the output file as well as number of positions held.

                      Comment


                        #12
                        int NTMarketPosition(string account)
                        Gets the market position for the selected instrument/account combination. Returns 0 for flat, negative for short and positive for long.
                        RayNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by algospoke, 04-17-2024, 06:40 PM
                        6 responses
                        49 views
                        0 likes
                        Last Post algospoke  
                        Started by arvidvanstaey, Today, 02:19 PM
                        4 responses
                        11 views
                        0 likes
                        Last Post arvidvanstaey  
                        Started by samish18, 04-17-2024, 08:57 AM
                        16 responses
                        61 views
                        0 likes
                        Last Post samish18  
                        Started by jordanq2, Today, 03:10 PM
                        2 responses
                        11 views
                        0 likes
                        Last Post jordanq2  
                        Started by traderqz, Today, 12:06 AM
                        10 responses
                        21 views
                        0 likes
                        Last Post traderqz  
                        Working...
                        X