Is there a way to move the chart canvas to a predefined that. I saw there is a Canvas get property but no set property. Is there any other way?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Move Chart Canvas via Ninjascript
Collapse
X
-
Move Chart Canvas via Ninjascript
I have a strategy that takes a screenshot at various events. The problem is that I have some strategy data and indicators that take up space on the right hand side and they sometimes overlap which makes the screen hard to read. I am using the Draw.TextFixed for the text.
Is there a way to move the chart canvas to a predefined that. I saw there is a Canvas get property but no set property. Is there any other way?Tags: None
-
Hello cutzpr,
Thanks for your post.
I may suggest changing ChartControl.Properties.BarMarginRight so it allows for enough distance for to fit your text so it does not overlap over bars and indicators. You may wish to store this value in a variable and set it back after you take your screenshot.
You could consider the following as well:
1. Store BarMarginRight in a variable
2. Change BarMarginRight to fit your text
3. Set a bool notifying that BarMarginRight was modified
4. Call ForceRefresh();
5. Check for your bool in OnRender() to trigger your screen capture, then reset your bool.
ChartControl Properties - https://ninjatrader.com/support/help...properties.htm
ForceRefresh() - https://ninjatrader.com/support/help...rcerefresh.htm
OnRender() - https://ninjatrader.com/support/help...8/onrender.htm
We look forward to assisting.JimNinjaTrader Customer Service
- Likes 1
-
Originally posted by cutzpr View PostIs there a way to move the chart canvas to a predefined
and to always have specific right hand space...
1.) Right Click on Canvas of Chart
2.) Left Click Properties at bottom..
3.) Adjust Right Side Margin to that desired..
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by jm_test19, Yesterday, 10:20 PM
|
0 responses
5 views
0 likes
|
Last Post
![]()
by jm_test19
Yesterday, 10:20 PM
|
||
Started by Lbclotto, Yesterday, 10:18 PM
|
0 responses
7 views
0 likes
|
Last Post
![]()
by Lbclotto
Yesterday, 10:18 PM
|
||
Started by Adamcoin33, Yesterday, 09:47 PM
|
0 responses
12 views
0 likes
|
Last Post
![]()
by Adamcoin33
Yesterday, 09:47 PM
|
||
Started by AmazonGuy, Yesterday, 02:06 PM
|
3 responses
10 views
0 likes
|
Last Post
![]()
by AmazonGuy
Yesterday, 09:19 PM
|
||
Started by cre8able, Yesterday, 07:16 PM
|
1 response
14 views
0 likes
|
Last Post
![]()
by rockmanx00
Yesterday, 07:59 PM
|
Comment