- ago
In C#, if you plot both the premarket high and premarket low using two instances of the PremarketHL indicator (one set for High and one set for Low) then sometimes the plots are drawn such that one is the same as the other. This can happen even though it is clear the values differ by looking at the premarket bars.

You can try this with a 1-minute or 5-minute scale.
Symbols exhibiting the problem for me: RBLX and COST.
Symbols not exhibiting the problem for me: U and C and XOM (and others).

Wealth Lab 8 build is 26
PowerPack build is 16
TD Ameritrade build is 10
Using Windows 11

Here's some sample code:
CODE:
using WealthLab.Backtest; using WealthLab.Core; using WealthLab.PowerPack; namespace WealthLabStrategies.PriceAction { public class PreMarketHighLow : UserStrategyBase { public override void Initialize(BarHistory bars) { base.Initialize(bars); var pmHigh = PremarketHL.Series(bars, "High"); var pmLow = PremarketHL.Series(bars, "Low"); PlotIndicator(pmHigh, WLColor.Red, PlotStyle.DottedLine); PlotIndicator(pmLow, WLColor.Green, PlotStyle.DottedLine); } public override void Execute(BarHistory bars, int idx) { } } }
0
220
Solved
8 Replies

Reply

Bookmark

Sort
Cone8
 ( 24.80% )
- ago
#1
I don't see it.
Please identify a specific case - symbol, date, and provider used.
0
- ago
#2
I used the small strategy I supplied in my original post. I started WL8 fresh and opened only the strategy of my original post. Here's some more info...

Symbol: RBLX
Data Scale: 5 minute
Data Range: Most Recent 4 Weeks
Date of strategy run: 2022/01/04 (yyyy/mm/dd) 13:14:03 (approx.)

You can see, below, the 2022/01/03 pre-market has the high and low the same with the low (green) sitting on top of the high (red). The cursor is at a point in time (roughly between 8:05 and 9:05) where it shows the high and low should differ, but they don't differ in the chart.

The entire chart has the low equal to the high with the low overlapping the high in the graph.

WL8 build is 26. PowerPack build is 16. Data source is TD Ameritrade and I'm using TDAmeritrade Extension build 10. I'm using Windows 11 on 5 monitors.

Maybe its a cache naming issue or the data is causing the issue. If you want me to send you my RBLX data to the support email, please let me know which file(s) to send.

Here's the chart:

0
Cone8
 ( 24.80% )
- ago
#3
I can't tell why you're getting that result. Here's your code on my computer. I only changed to PlotStyle.Dots (it's a better display for this type of indicator).


0
Cone8
 ( 24.80% )
- ago
#4
It must be because you assigned the symbols to a different market. You have a Market called "US Stocks Pr...".

Probably you defined that market using the premarket hours. If you do that, then the "market" doesn't have a "premarket". Clear?

Just use the "U.S. Stocks" market and uncheck the "Filter Pre/Post Market Data" in the Strategy Settings.
2
Best Answer
- ago
#5
That was it! Thanks! I temporarily adjusted the hours of the market that I defined to be 09:30 to 16:00 and the chart was correct. I set them back to 04:00 to 20:00 because I need those hours for other reasons. I'll just code up something in my library that does the same thing as the indicator. And, thanks for the "dots" tip.
1
Cone8
 ( 24.80% )
- ago
#6
Okay, but just so that it's clear that all the data available will load just by unchecking the "Filter... " (Then you don't need extra code.)
0
- ago
#7
Just to be clear that I'm not overlooking anything...

In my markets.txt I have this line:
CODE:
*V2,US Stocks PrePost,Eastern Standard Time,Weekdays,SPY,2,0,Stock,USD,04:00:00,20:00:00,,USA

All three, four and five letter symbols are assigned to the above market (i.e. ###, #### and #####).

So, using the above, when I run the sample code, using the previously indicated symbol, etc. with "Filter Pre/Post Market Data" unchecked in the strategy settings then the chart has high and low the same. From what you told me that is expected because there simply is no premarket because of the hours defined for the market I added.

But, quite some time back I added the "US Stocks PrePost" market (in markets.txt) with the 04:00 to 20:00 hours because I had strategies that relied on pre-market data. I thought I was told I had to do that to utilize premarket data in the strategy when running in the strategy monitor. I may have misunderstood. I realize there is the "Filter Pre/Post Market Data" checkbox in the strategy monitor settings.

So, now I'm confused. Let's presume I have a strategy that requires pre/post market data, and I'm configured to use only the built-in US Stocks market (09:30 to 16:00) (Presume I don't have the US Stocks PrePost market.) If I run the strategy in the strategy monitor, using the built-in US Stocks market, with appropriately assigned symbols, and when configuring the strategy monitor I uncheck the Filter Pre/Post Market Data checkbox, and my strategy only transacts after 9:30 anyhow, will the strategy still be able to utilize the premarket data (like for moving averages, etc.)? (Assume I use like 500 or 1000 bars back.)
0
Cone8
 ( 24.80% )
- ago
#8
That was probably the case before the S. Monitor had the Filter checkbox. Now if you uncheck "Filter", the S. Monitor will schedule runs outside of market hours too. It'll keep running all night, 24-hours, but it won't matter after 8pm or whenever the post market stops serving data.
1

Reply

Bookmark

Sort