Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NTAvgEntryPrice(NinjaAccount)

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

    NTAvgEntryPrice(NinjaAccount)

    I am running efs ATIon the NT simulator using NT Playback, which has been working perfectly for months. I am now trying to retrieve the fill price for ANY order using NTAvgEntryPrice().

    To do this I am entering and exiting positions on various bars in my chart and printing NTAvgFillPrice() below EVERY bar in the chart. This always prints 0, whether I am in a trade or not. In other words, whether I am in a trade or not I can not get the function to return a value.

    Suggestions?

    #2
    imported post

    Can you take a look at the NTSample file? Use that as a benchmark since it will plot out the information. Then make changes step by step to get to the desired result that you are looking for. Somewhere you are missing something but I don't have any idea what that could be which is why I always suggest starting with something that works and make changes in small steps.

    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      I loaded NTSample.efs into a blank chart of russell emini with NTPlayback.efs running. Started TickReplay. DOM showed correct action but no Buy took place. Debug output therefore was all zeros.


      Comment


        #4
        imported post

        Can you run it on a live feed?
        RayNinjaTrader Customer Service

        Comment


          #5
          imported post

          Running now live feed....still all 0s

          Comment


            #6
            imported post

            I added a line to NTSample.efs in the else line (ie. if buy made/or not made)

            drawText("long", BelowBar2);

            This prints "long" below each bar...however, only when chart is refreshed....ie. not for current bar...this is strange....it should print on every bar

            Of course, I should have had a buy and then the debug data on every bar also.....

            Comment


              #7
              imported post

              Not sure how that functions works, bestcheck with eSignal.
              RayNinjaTrader Customer Service

              Comment


                #8
                imported post

                It would appear the problem was symbol mapping rather than the .dll file.

                For some reason, ES U6 maps from eSignal to NT as ES2 09-06 without a problem and therefore NTSample.efs works fine for the ES. If you change the symbol in the chart to AB U6, you get all zeros (OR it shows some of the previous values for ES U6 if you ran the chart first on ES).

                I added the function snippet provided in an earlier post as follows:

                // symbol mapping workaround....
                function getMySymbol()
                {
                vTicker= getSymbol();
                if (vTicker== "AB U6")
                vTicker= "ER2 09-06";
                return vTicker;
                }

                Then change the code in all the relevant functions from getSymbol() to getMySymbol() andit works fine. Every time you Reload NTSample.efs, it buys another lot and updates the debug info.

                Suggest NT might add the above functionand function changes to NTSample.efs; or document that NTSample.efs will only work for ES. Need to change above function code for dates of course.

                I am curious to know why NTSample.efs only worksAS ISfor the ES, since ES is not referenced anywhere in the code. Anybody?

                Comment


                  #9
                  imported post

                  Even better...work $PLAYBACK into symbol mapfor using eSignal Tick Replay mode as follows:

                  // symbol mapping workaround....
                  function getMySymbol()
                  {
                  vTicker= getSymbol();
                  if (vTicker== "AB U6")
                  vTicker= "ER2 09-06";
                  if (vTicker== "$PLAYBACK")
                  vTicker= "ER2 09-06";

                  return vTicker;
                  }

                  This assumes you want to trade/test using the Russell 09-06 contract of course.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by bsbisme, Yesterday, 02:08 PM
                  1 response
                  15 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by prdecast, Today, 06:07 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post prdecast  
                  Started by i019945nj, 12-14-2023, 06:41 AM
                  3 responses
                  60 views
                  0 likes
                  Last Post i019945nj  
                  Started by TraderBCL, Today, 04:38 AM
                  2 responses
                  18 views
                  0 likes
                  Last Post TraderBCL  
                  Started by martin70, 03-24-2023, 04:58 AM
                  14 responses
                  106 views
                  0 likes
                  Last Post martin70  
                  Working...
                  X