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.

        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.

                  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 bortz, 11-06-2023, 08:04 AM
                    47 responses
                    1,603 views
                    0 likes
                    Last Post aligator  
                    Started by jaybedreamin, Today, 05:56 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post jaybedreamin  
                    Started by DJ888, 04-16-2024, 06:09 PM
                    6 responses
                    18 views
                    0 likes
                    Last Post DJ888
                    by DJ888
                     
                    Started by Jon17, Today, 04:33 PM
                    0 responses
                    4 views
                    0 likes
                    Last Post Jon17
                    by Jon17
                     
                    Started by Javierw.ok, Today, 04:12 PM
                    0 responses
                    12 views
                    0 likes
                    Last Post Javierw.ok  
                    Working...
                    X