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
Show Global Drawing Objects Button Code
Collapse
X
-
Originally posted by jhowinvest View Post
-
Okay. Thank you.
If anyone else has any suggestions please reply.
Leave a comment:
-
jhowinvest, unfortunately this would be out of the scope we can offer support for here. I'll leave this thread open though for other members of the community to share their thoughts.
Leave a comment:
-
Show Global Drawing Objects Button Code
I have the following code that works to toggle the show global drawing objects from true to false and from false to true. However, it only works for all future drawing objects instead actually turning off and on current global drawn objects. For example if you have a vertical line drawn on a chart and attach to all charts.....I then have another chart with show global objects set to false. I click this button with the assigned code below and it will change the show global objects to true as intended but the global drawn object does not show up. If you then draw a new globally drawn object it will show on the chart but no historically drawn objects will.
If you go through the data series menu and change the show global draw objects back and forth between true and false and click OK or Apply the global drawing objects will appear and disappear as intended. For some reason the button click isn't working like this. The button click is only changing from true to false or false to true but seems to not be the same as manually changing in the data series menu and clicking apply or ok. Is it possible to do the same think as clicking apply or ok on my custom button clicking event? Is there something I can do to the code to make it do the same thing as using the data series show global objects?
Here is the button click event code I am using:
private void btnGlobal_Click(object sender, EventArgs e)//includes toggle function with logic below for markers
{
if (ShowGlobal == true)
{
ChartControl.BarsArray[0].BarsData.ShowGlobalDrawObjects = true;
ShowGlobal = false;
}
else if (ShowGlobal == false)
{
ChartControl.BarsArray[0].BarsData.ShowGlobalDrawObjects = false;
ShowGlobal = true;
}
}
Thank you.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by usazencort, Today, 01:16 AM
|
0 responses
1 view
0 likes
|
Last Post
by usazencort
Today, 01:16 AM
|
||
Started by kaywai, 09-01-2023, 08:44 PM
|
5 responses
603 views
0 likes
|
Last Post Today, 12:32 AM | ||
Started by xiinteractive, 04-09-2024, 08:08 AM
|
6 responses
22 views
0 likes
|
Last Post Today, 12:31 AM | ||
Started by Pattontje, Yesterday, 02:10 PM
|
2 responses
21 views
0 likes
|
Last Post
by Pattontje
Yesterday, 11:49 PM
|
||
Started by flybuzz, 04-21-2024, 04:07 PM
|
17 responses
230 views
0 likes
|
Last Post
by TradingLoss
Yesterday, 11:45 PM
|
Leave a comment: