Its taking a screenshot of the active tab of the chart the script is applied to.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Screenshotting from a Strategy
Collapse
X
-
how could I check that the active tab is the same chart as the strategy is running on? I want to make my code only take a screenshot if the correct tab is active.
Comment
-
Hello NinjaCustomer,
Below is a link to a few examples that detect if current tab is the tab the indicator is applied to.
Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I'veChelsea B.NinjaTrader Customer Service
Comment
-
ok, just one last small question...
how does a Strategy that is not attached to a chart work? does it have some invisible chart? I mean, Strategy code that interacts with Chart objects like getting the Chart variable or drawing objects on the Chart I assume is perfectly safe to run in a Strategy that is created in the Strategies tab and is not attached to any specific chart in the workspace, correct?
Comment
-
Hello NinjaCustomer,
If added to the Strategies tab of the Control Center directly or when backtested, the ChartControl will be null. The primary data series is selected in the strategy parameters for the Strategy Analyzer and Strategies tab of the Control Center.
If the ChartControl is null, those actions won't happen.
Below is a link to the Strategy Builder 301 course which demonstrates enabling a strategy on the Strategies tab of the Control Center.
Chelsea B.NinjaTrader Customer Service
Comment
-
my OnRender() is not being called. I put a Print statement in there and can't see it in the output. I have a ForceRefresh() call also but the event doesn't get called.
I simply placed the OnRender event in Strategy.. is that correct? or do I need to somehow attach it to ChartControl?
Comment
-
I added the base render call and for some reason it works now.. very strange that the print statement wouldn't work without it
Comment
-
if they do actually implement it, do you think it will be able to save charts on tabs that are not active?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|
Comment