Its taking a screenshot of the active tab of the chart the script is applied to.
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 Stanfillirenfro, Today, 07:23 AM
|
1 response
2 views
0 likes
|
Last Post Today, 07:37 AM | ||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
2 responses
20 views
0 likes
|
Last Post Today, 07:24 AM | ||
Started by olisav57, Yesterday, 07:39 PM
|
1 response
9 views
0 likes
|
Last Post Today, 07:23 AM | ||
Started by cocoescala, 10-12-2018, 11:02 PM
|
7 responses
943 views
0 likes
|
Last Post
by Jquiroz1975
Today, 07:21 AM
|
||
Started by oviejo, Today, 12:28 AM
|
1 response
12 views
0 likes
|
Last Post Today, 07:20 AM |
Comment