I have created a indicator, mainly to serve as a visual aid in larger back-tests, that draws dots, texts and lines on key price points to show if specific patterns are forming.
I have also written this indicator as a 'strategy' so that I may place it in a back-test to see if the logic is calculating correctly in the output window with prints. This has in fact shown that it does calculate correctly when patterns are found; however, the problem is that they only print on the chart in the last calculated instance from the loaded data.
As shown below, I have loaded three days worth of data but it only printed on chart on the last day (green circle) when it also should have printed on chart on prior days as well (red circles).
The blue diamond shows a cancellation, or where to stop monitoring for the forming pattern. In this case it only printed on day two. The output shows that the blue diamond should have also printed on day one which says "xxxxxx[87]DownMomentumMove is cancelled...."
This is the syntax I used to draw the dots and texts on the chart. This sentence pair of logic also applies for all of my other prints and shapes on the chart.
{
Draw.Dot(this, "DownA", true, LegConsecutiveBars - 1, DownA, Brushes.Gold); //Marks dot on chart for DownA
Draw.Text(this, "DownAtext", "DownA", LegConsecutiveBars - 1, DownA + 2, Brushes.LightBlue); //Marks text on chart for DownA
}
What may be the issue that prevents it from printing it every day on historical data?
​

Comment