• 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

Profits Are Not Updating

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

    Profits Are Not Updating

    Hi fellow traders and programmers,

    I would like to first start off by saying thanks to the staff for all the support that they provide. If you ever need me to do a positive review, I'm down for it.

    So, I'm running a strategy on the simulator and for some reason, the orders are being submitted, but the profits are not being updated. I noticed the same thing when I run the backtester. Also, I know a few months back, the tick replay was not working correctly. I'm saying that there was no simple solution to have a chart that trades on 15 mins candles, yet enters trades based on the tick and not waiting to the end of the bar. Has that feature been fixed? Thanks again.
    Last edited by BernWillChris; 05-17-2016, 11:41 AM.

    #2
    Hello BernWillChris,

    Thanks for your post and comments.

    Can you provide some clarity regarding the profits not being updated? Is this not being seen on the superdom, the accounts tab, the strategies tab, etc, etc. Can you provide a sequence of steps that you use where you should produce profits but are not?

    When you run a backtest, is the strategy analyzer not showing the results of the strategy? Can you test this using the SampleMaCrossover and advise if this shows results?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi Paul, I was unable to delete this post. I was able to solve one of the two problems that I was facing. Profits were staying at zero because I programmed the strategy to open up trades that were too small for the system to show anything. Once I increased the order size, everything was working for the simulator.

      Now for the backtest, I used the 15 min charts and then I set Historical fill processing to

      1.) Order fill resolution to High
      2.) Type to Tick
      3.) Value to 1

      In the code, in OnStateChange(), I set

      1.) Calculate = Calculate.OnEachTick
      2.) OrderFillResolution = OrderFillResolution.High;
      3.) OrderFillResolutionType = BarsPeriodType.Tick;
      4.) OrderFillResolutionValue = 1;

      I also tried using the sample, SampleIntrabarBacktest, which was updated last month and I had no success.

      Basically, what the backtester is showing, is order increments of 15 mins. If the feature was working the way that I wanted, I would see orders being place at times such as 1:43.09, 7:24.52 instead of 1:45 and 7:30. The SampleMACrossOver shouldn't work since it isn't programmed inside the code to calculate on each tick.

      Thanks in advance for your help.
      Last edited by BernWillChris; 05-16-2016, 12:38 PM.

      Comment


        #4
        Hello BernWillChris,

        Thank you for your response.

        So I may investigate this matter further please answer the following questions.
        • Are you checking the Executions tab for the times of the order fills?
        • Who are you connected to when running this test? This is displayed with green dot in the Connections menu of the Control Center.
        Patrick H.NinjaTrader Customer Service

        Comment


          #5
          Hi Patrick,

          May I respectfully request that you delete my second post that is similar to this one. I created another one and placed solved in the title for this one, but it isn't visible from the outside. To answer your questions, I'm looking under the trades section of the strategy analyzer. The closing prices seem reasonable. But the open prices do not.

          For your second question, I'm connected to an account created by FXCM.

          Comment


            #6
            I tried to trick the system by removing all text and save, but you must have a minimum amount of characters. So I just placed solved in the title, but it is not visible from the outside. From the inside, you should see it.

            Comment


              #7
              Hi Paul,

              I've 2 posts that are somewhat similar and I have no ability to delete one my end. However, the second problem that I'm facing has not been solved as of yet. At 2:27, yesterday, I posted a detailed post. To answer your additional questions:

              1.) I got the simulator to work as expected.
              2.) For the SampleMACrossover strategy, it isn't placing trades based on tick values. I will take an image and try to upload it on here.

              Thanks

              Comment


                #8

                If you look at this image, you will see that the orders are being placed around the open or close of a bar. This will cause my strategy not to be accurate on the backtest since I had programmed it to enter trades as soon as the conditions are satisfied. For instance, if the 7 MA crosses the 14 MA at 9:17:46, then the order will be placed at that time instead of waiting til 9:30, if I'm on the 15 min charts, and missing a lot of the move.

                The exit close times seem reasonable and the tick replay is probably working correctly for that part.

                Thanks in advance.
                Last edited by BernWillChris; 05-17-2016, 11:51 AM.

                Comment


                  #9
                  Hello BernWillChris,

                  Thank you for your patience.

                  Tick Replay will not allow for the Strategy Analyzer to have conditions occur intra-bar. While you can use High Fill Resolution for the orders, they would still fill after the bar that triggered the condition closes.

                  On a chart you can use Tick Replay with High Fill Resolution in the manner you wish. This would allow for the strategy to see intra-bar movements for conditions historically - as long as you set the Calculate option to OnPriceChange or EachTick. In the Strategy Analyzer you would not have the option for Calculate either.

                  Please let me know if you have any questions.
                  Patrick H.NinjaTrader Customer Service

                  Comment


                    #10
                    Hi,

                    Thanks for your reply. I'm assuming that there is no coding on my end that would solve this problem. Using the simulator is a great way to get accurate data on the backtest, but it slow on just testing a
                    week's worth of data, since this is not what it was intended to do originally and there is not trick to get an accurate optimizer test. I was looking at BarsInProgress, but I couldn't get that to work either. Thanks again for your help.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by GussJ, Today, 01:30 PM
                    1 response
                    5 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Started by GARZONJ, Today, 12:25 PM
                    3 responses
                    13 views
                    0 likes
                    Last Post NinjaTrader_PaulH  
                    Started by RandanAL, Today, 11:53 AM
                    1 response
                    13 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Started by yeshujbp, 07-21-2019, 02:40 PM
                    2 responses
                    35 views
                    0 likes
                    Last Post omololu
                    by omololu
                     
                    Started by seagraph, Yesterday, 03:27 PM
                    1 response
                    29 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Working...
                    X