I've searched forum and guide for an answer and can't find it so I need to ask the experts.
There is a time delay reading the Stoch values from an AddDataSeries chart.
I have two charts open: Same market
1. 15 Range chart. Strategy runs on this one and calls the Stochastics from a 5 minute chart. No indicators.
2. 5 Minute chart. (the AddDataSeries chart) Stochastics indicator only.
I have the Stoch K value (being called from the 5 min chart) print to the Output window (by the Strat on the 15 Range Chart).
Start the Strat. At close of bar on the 15 range chart, it prints the K
value. It does not match the K value on the 5 min chart. This continues for about 20 bars or so on the 5 min chart. Then, the K value being printed "catches up" with the K value on the 5 min chart and reads correctly the rest of the day.
Its as if the AddDataSeries chart doesn't see any historical data and the Stoch starts at the close of the 1st 5 min bar once the strategy starts. Then catches up after enough bars have printed to match the open 5 min chart.
Is there anything I can do so it reads the K value correctly from the very start? (some variable added to the AddDataSeries code ???)
The strat trades based off the K value of the 5 min chart so I really need it working from the "get go". Or do I have to start the Strat an hour or two early so the K can catch up to the real 5 min chart?
Thanks!
Comment