Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Anyone using E-Signal EFS to AutoTrade FX?

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

    Anyone using E-Signal EFS to AutoTrade FX?

    Just curious who is out there doing this? I have full blown E-Sig since the E-Signal FX charts do not support running efs. I have a program I have been autotrading futures with, that I converted from esig->DynaOrder->IB to esig->NT but trading FX instead. Today was my first day that I gave my script a whirl, so I should have some results by the end of tomorrow.

    My question to the community, is there any one out there doing this exact same thing? Was just looking for a potential reference if I ran into issues.

    Also, for the NT guys reading this, your E-Sig sample code on your website has tons of syntax errors in it. I cleaned it up to run in my script and when I am ready, I can post the live order logic if anyone is interested.

    Regards,

    Thomas.

    #2
    Thomas,

    If our sample has some syntax erorrs, would appreciate (if possible) a corrected version.

    Thanks
    RayNinjaTrader Customer Service

    Comment


      #3
      Corrections

      Ray,

      The following were not correct. Just look on the "eSignal Sample Code" page at http://www.ninjatrader-support.com/H....html?Overview:

      // Place a buy stop order. "orderId" is optional (set to "" it not applicable).
      function NTBuyStop(orderId, quantity, stopPrice) {
      return NTCommand("Place", "", "Buy", quantity, "Stop", 0, stopPrice, "", "", orderId, "", "");
      }

      and:

      // Get a string of order IDs of all stop orders of a strategy separated by '|'.
      function NTStopOrders(strategyId) {
      return dll.call("StopOrders", strategyId);
      }

      I also declared the following in the beginning of my script, otherwise you get undeclared variable errors:

      // NT VARIABLE DECLARATIONS
      var account=0;
      var orderId=0;
      var quantity=0;
      var limitPrice=0;
      var stopPrice=0;
      var name=0;
      var strategyId=0;

      The one question I am still not certain about is whether or not you need to declare the account variable? When would you ever be trading multiple accounts on one connection? The connection to my GAIN account is declared in the Connection config, so I am not sure how I would be able to route an order to another account through that connection?

      One other matter while I am thinking about it. I am on the Simulation Mode after entering my GAIN production account info. If I take NT off of the Simulator state, I trust that is all that is needed to route my orders live to the market?

      I will be running my script again tomorrow and I should be able to get further, if there is anything else I notice, I will post a note.

      Regards,

      Thomas.

      Comment


        #4
        On the EFS sample script issues:
        - please make sure you are on latest 6.5.1000.1 (see download page)
        - copy <program files>/NinjaTrader6.5/binAutoTrade/NTSample.efs to <eSignal installation folder>/Formulas/Download)
        - start eSignal and NT
        - in eSignal: Right click on chart->Formulas->Download->NTSample

        Where exactly do you now see messages which make you believe there are script syntax issues?
        DierkNinjaTrader Customer Service

        Comment


          #5
          Testing Results

          The errors in syntax I saw on the web-page version of EFS samples. I tested the version of the script that came with NT 6.5. I am using E-Sig version 8.0 (07/2006 Build - I have the version number at home).

          In terms of testing, I started E-Sig, started NT. I then opened a 1-minute standard chart on the JPY/USD pair. The e-sig symbol is "JPY A0-FX". I took the sample script that was in the AutoTrade folder, and loaded the script into the chart.

          Looking at the logs in NT, this is what I see:

          4/8/2008 10:16:16 AM ATI OIF, 'Place;;JPY A0-FX;Buy;1;Market;0;0;;;MyOrderId;;' holds unknown instrument 'JPY A0-FX'

          When I place an order straight from the front-end of NT, this is what a normal order looks like:

          4/8/2008 10:27:33 AM Connection GAIN: Primary connection=Connected, Price feed=Connected
          4/8/2008 10:28:10 AM Order Submitting order without strategy...
          4/8/2008 10:28:10 AM Order Order='2151b5210f8f4504b81a14dbcb462b75/Sim101' Name='' New State=PendingSubmit Instrument='$USDJPY' Action=Buy Limit price=102.47 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          4/8/2008 10:28:10 AM Order Order='2151b5210f8f4504b81a14dbcb462b75/Sim101' Name='' New State=Accepted Instrument='$USDJPY' Action=Buy Limit price=102.47 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          4/8/2008 10:28:10 AM Order Order='2151b5210f8f4504b81a14dbcb462b75/Sim101' Name='' New State=Working Instrument='$USDJPY' Action=Buy Limit price=102.47 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          4/8/2008 10:29:59 AM Order Order='2151b5210f8f4504b81a14dbcb462b75/Sim101' Name='' New State=Filled Instrument='$USDJPY' Action=Buy Limit price=102.47 Stop price=0 Quantity=1 Type=Limit Filled=1 Fill price=102.47 Error=NoError Native error=''
          4/8/2008 10:29:59 AM Execution Execution='4baf648ec7a14283bcfc903fdd3df555' Instrument='$USDJPY' Account='Sim101' Exchange=Default Price=102.47 Quantity=1 Market position=Long Operation=Insert Order='2151b5210f8f4504b81a14dbcb462b75' Time='4/8/2008 10:29:59 AM' Multiplier=100 Rate=0.00976276481499561
          4/8/2008 10:29:59 AM Position Instrument='$USDJPY' Account='Sim101' Avg price=102.47 Quantity=1 Market position=Long Operation=Insert Currency=Unknown

          The other issue is that when I unload the script from the chart, E-Sig crashes, with message and all. I am wondering if this functionality is only supported after a certain version of e-sig? I can tell you that I went through several version of e-sig with DynaOrder, and never had a dll issue that was version dependent.

          Is there not some type of a need to pass a symbol along with the call that can be decyphered by NT? I was told that it should read it from the chart.

          Let me know what I am doing wrong, and thanks for all assistance.

          Regards,

          Thomas

          Comment


            #6
            Please see my post below: Where exactly do you now see messages which make you believe there are script syntax issues?

            >> 'Place;;JPY A0-FX;Buy;1;Market;0;0;;;MyOrderId;;' holds unknown instrument 'JPY A0-FX'
            NT is unable to map this instrument to the NT internal "$USDJPY". I suggest changing the sample script to explicitly stuff in "$USDJPY" instead of the generic "getSymbol()".

            On the crash: Sorry I don't know. You would need to contact eSignal for clarification. I noticed that eSignal sometimes crashes even without any NT script.
            DierkNinjaTrader Customer Service

            Comment


              #7
              Syntax Errors

              Dierk,

              The syntax errors are from the online-documentation on the NinjaTrader site, under esignal Integration->Sample Code, and NOT from the installation scripts which come with the install:

              // Place a buy stop order. "orderId" is optional (set to "" it not applicable).
              function NTBuyStop(orderId "Buy", quantity, "StopLimit", limitPrice, stopPrice, "", "", orderId, "", "");
              }

              // Get a string of order IDs of all stop orders of a strategy separated by '|'.
              function NTStopOrders(strategyId) {
              return dll.call("StopOrders", strategyId);

              I am still not sure why it is crashing, has anyone tested this for use with FX?

              Regards,

              Thomas.

              Comment


                #8
                Where exactly do you see syntax errors?
                DierkNinjaTrader Customer Service

                Comment


                  #9
                  Syntax Corrections

                  The functions below should be written as the following:

                  // Place a buy stop order. "orderId" is optional (set to "" it not applicable).
                  function NTBuyStop(orderId, quantity, stopPrice) {
                  return NTCommand("Place", "", "Buy", quantity, "Stop", 0, stopPrice, "", "", orderId, "", "");
                  }

                  // Get a string of order IDs of all stop orders of a strategy separated by '|'.
                  function NTStopOrders(strategyId) {
                  return dll.call("StopOrders", strategyId);
                  }

                  There were missing commas, brackets and such. Once again, this was NOT from the attached script in the bin/autotrade folder, rather on your website.

                  Aside of the syntax issues, can someone please just examine the proper symbol parameter passing from E-Signal charts to NT? I have not tested this with futures, as I am using this application for FX with Gain.

                  The issue is that the E-Sig Symbol of JPY AO-FX is not getting translated to something that NT can understand, such as $USDJPY. Is there some mapping that needs to be set?

                  I assume all of this was tested somewhere, so it should be just a configuration issue.

                  Regards,

                  Thomas.

                  Comment


                    #10
                    >> this was NOT from the attached script in the bin/autotrade folder, rather on your website.
                    To clear up the confusion: could you post a link on where you saw this so we could fix it? Thanks

                    On the symbol name itself: Please see my post below, you would need to change the script and hard code the symbol name instead of going with "getSymbol()". Thanks
                    DierkNinjaTrader Customer Service

                    Comment


                      #11
                      Got it, thanks for reporting the syntax error. Will resolve immediately on online help guide.
                      RayNinjaTrader Customer Service

                      Comment


                        #12
                        Link to Web Page

                        http://www.ninjatrader-support.com/H....html?Overview

                        Because you are using frames, I can not isolate the actual URL to the final page.

                        Just follow:
                        Automated Trading -> esignal Integration -> Sample Code

                        Also, will the following section below ever be finished:
                        Automated Trading -> esignal Integration -> Set Up

                        I am going through extensive testing right now, just let me know if you need a volunteer to send you notes on issues encountered.

                        Thanks for the correction, I will test as soon as I can.

                        Regards,

                        Thomas.

                        Comment


                          #13
                          Thanks for this info. We'll look into.
                          DierkNinjaTrader Customer Service

                          Comment


                            #14
                            But why does E-Signal Crash?

                            Dierk or anyone else . . .

                            I did as suggested and I managed to get an order placed from the sample script to NT, clicked off the confirm order so it goes through automatically, but the one strange thing is that E-Signal crashes if you unload the script. Matter of fact, it crashes no matter what you do. Is this a side effect of the NTSample script, or some undocumented functionality . . . hope not

                            Has any of the NT admin staff experienced this behavior when developing the software?

                            I plan to test an entire end to end script next week, but I am just wondering if I need to update E-Sig. I am on build 782 (7/20/2006).

                            Let me know . . .

                            T

                            Comment


                              #15
                              I do know that some eSignal scripts can crash eSignal. This is something that is an issue with eSignal as it should be able to handle script errors gracefully. We have no problems nor any reported problems with the provided sample script.
                              RayNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by jeanne, Today, 03:43 AM
                              1 response
                              17 views
                              0 likes
                              Last Post NinjaTrader_ShawnB  
                              Started by Titli, Today, 09:36 AM
                              0 responses
                              16 views
                              0 likes
                              Last Post Titli
                              by Titli
                               
                              Started by Mongo, Today, 09:28 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post Mongo
                              by Mongo
                               
                              Started by akvevo, Today, 08:59 AM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_ShawnB  
                              Started by vantojo, Today, 08:14 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post vantojo
                              by vantojo
                               
                              Working...
                              X