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!
See more
See less

Partner 728x90

Collapse

Show Global Drawing Objects Button Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • KeenEdge
    replied
    Originally posted by jhowinvest View Post
    Okay. Thank you.

    If anyone else has any suggestions please reply.
    The problem is still not solved. whether there is a solution on how to solve? Please help.

    Leave a comment:


  • jhowinvest
    replied
    Okay. Thank you.

    If anyone else has any suggestions please reply.

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    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:


  • jhowinvest
    started a topic Show Global Drawing Objects Button Code

    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.

Latest Posts

Collapse

Topics Statistics Last Post
Started by WHICKED, Today, 04:10 PM
1 response
28 views
0 likes
Last Post NinjaTrader_ShawnB  
Started by Trasss_Kenneth, Today, 01:49 PM
2 responses
55 views
0 likes
Last Post bltdavid  
Started by Newtrader101, Today, 03:22 PM
2 responses
33 views
0 likes
Last Post Newtrader101  
Started by johnMoss, Today, 01:43 PM
5 responses
52 views
0 likes
Last Post NinjaTrader_ChrisL  
Started by qs121, Today, 12:24 PM
2 responses
49 views
0 likes
Last Post qs121
by qs121
 
Working...
X