Playback speed, run large test variable speed no reset

In the old forum there was a complaint about Playback speed on weekends.

Scenario, you want to test 3 months of a future contract. Personally, I do this a great deal of the time. I have code that allows you to set playback speed to Max integer from Normal close to normal open 2PM 3PM for pacific time zone and also from 2PM Friday till 3 PM Sunday.

I do not like to test at over 5X speed as I do not trust it. I have the ability to set speed to a configurable speed and to change it in a strategy when approaching a possible trade

Reply back to thread is there are interested parties I will schedule a demo on Zoom

You can also rest to a given second in time

2 Likes

Be careful if you test with different speeds (higher than 1), because the results are not correct. If you test at speeds higher than 1 the playback skips data and does not check all prices. I did a test : buy when price goes above ema.

These are the results:

  1. at speed 1 bought at 24747,00
  2. at speed 10 bought at 24746,00
  3. at speed 30 bought at 24755,50
  4. at speed 100 bought at 24755,25
  5. at speed 100 ( with a different starting time) bought at 24762,75

The speed defines how many data the playback is skipping before buying.

1 Like

Fair point, I have the ability and do change the speed before entry. I buy 1@ a time. If I was to buy 10 I would go to NQ. I have a setup and an execution. There has to be a significant down move and an upturn before I buy reverse on sell. In fact I run some tests at 16,000x waiting for an event then slow down to 20X. My code gives the user the choice.. You can set the speed in the strategy.

I have run tests at 5X speed and then find my test has been stuck running Saturday at 5X. Much better to set speed to MAX at 5PM ET Friday.

Here is an example this is today in Playback I would be running @ 1600X until I get to yellow, 20X @orange 1X when I get the white signal.

1 Like

huh, that is quite interesting. It never occurred to me playback speed could be controlled in such a fine manner. Do you know what the default “Max” setting is as far as an exact number? Or is “Max” quite literally the “Max” and will vary depending on system and data factors? 16,000x sounds quite high but I’m curious how it compares to “Max”.

1 Like

MAX int. 2147483647 I hardcoded it some time ago

C# - int.MaxValue and int.MinValue - Dot Net Perls

Ahh gotcha. In your experience how does that compare to the Max setting for the default Market Replay Max speed? The one that comes bundled with Ninja Trader and that anyone can use out of the box.

Also, in your experience, has the slower *playback speed worked to make a meaningful difference in your P/L?

I see different results at different speed I trust the slower speed more. For diagnostics of a strategy/indicator I prefer to go at MAX speed until I get close to a trade then slow down.

I wrote in my previous post that for a correct price, you should use the lowest speed. All the other speeds become less accurate. The higher speeds don’t check all quotes, they skip blocks of data to go faster.
I first check the zone where a buy or sell signal can be generated and go directly to a short time before that point. Then I use the lowest speed to pinpoint the exact moment where the signal is generated.

I buy 1 contract unless I allow more. My code does not buy 100 EVER. I learned that lesson in Tradestation. You cannot fathom the fun of buying 150 NQ contracts,

I will create a video in the next few weeks. I run Playback int.MAX @ C# - int.MaxValue and int.MinValue - Dot Net Perls until I am near a buy point

I created a range bound MACD for this test case, LONG only. If MACD GT -5 Run @ int.MAX once MACD < -5 slow to 5. In trade I can set it to 1 or leave it at 5.

I know exactly when order fired and can test at any speed when I do not trust the results. Logging does matter.
01/04 06:39:27.715 @ 10/02 18:03:13 [IDM:MNQ 12-25] Received StopManagement Command: “MNQ 12-25:PauseAfterProfit”

01/04 06:39:27.715 @ 10/02 18:03:13 [IDM:MNQ 12-25] StopManagement = Pause After Profit

01/04 07:47:09.147 @ 10/02 18:03:14 [IDM:MNQ 12-25] StopManagement = Auto

01/04 07:47:28.950 @ 10/03 04:39:17 [TM:Playback101:MNQ 12-25] Detected Controller Entry Via Indicator “AutoMacdSpeedTestStrategy:tggjv4gXQjhs6ridLmQFZr5fr5tqUh9J64xQjy85fZ0” Buy Market Qty 1

01/04 07:47:28.950 @ 10/03 04:39:17 [TM:Playback101:MNQ 12-25] Created Order From AutoMacdSpeedTestStrategy Trade #827 - TradeId f9783c0ab4c4af48844254aae11493f6

1 Like

There is some language in my logs that will not make any sense, I also have code to add contracts once in profit and to trail the stop or not. I will show the speed test once I have the LockPofit dialed in that is my focus.

1 Like