• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 thgamey, Yesterday, 08:38 PM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_Marco  
                  Started by stredtity, Today, 01:21 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post stredtity  
                  Started by superg3, Yesterday, 10:12 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post superg3
                  by superg3
                   
                  Started by johnnybegoode, Yesterday, 07:02 PM
                  0 responses
                  10 views
                  0 likes
                  Last Post johnnybegoode  
                  Started by YevhenShynkarenko, Yesterday, 05:02 PM
                  1 response
                  15 views
                  0 likes
                  Last Post YevhenShynkarenko  
                  Working...
                  X