I’m working on a Strategy and would like to take a chart screenshot automatically whenever a trade is executed — either Long or Short.
As a reference, I used post #7 from the following thread:
Specifically, I simplified the attached file MyScreenTaker.cs.
When I apply the indicator directly to a chart, it works perfectly: the screenshot is saved to disk when I click the button, as expected.
The problem starts when trying to integrate it with a Strategy:
- First, I copied the core screenshot logic directly into the Strategy, and tried executing it when an order is filled — nothing happened.
- Then, I tried referencing the working indicator (SmartChart) from the Strategy and calling its TriggerScreenshot() method.
- The indicator is correctly added using AddChartIndicator().
- The screenshot button even appears on the chart!
- But pressing the button does nothing, and no screenshot is saved — not even when calling the method from code upon trade execution.
If not, what are the known limitations?
Thanks in advance for any help or clarification!
Fz

Comment