Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ChartControl

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

    ChartControl

    I am trying to use the below command to refresh the chart, but unable to compile. I am using it in OnBarUpdate.
    The error is below, please advise.
    The name ChartControl does not exist in the current context.


    using NinjaTrader.Gui.Chart;

    if (ChartControl != null)
    {
    ChartControl.OnReloadNinjaSc riptHotKey(this, new System.Windows.Input.KeyEventArgs(Keyboard.Primary Device, PresentationSource.FromVisual(chartControl), 0, Key.F5));

    }
    Last edited by kashmiami; 08-20-2023, 01:49 PM.

    #2
    Hello kashmiami,

    Thanks for your notes.

    ChartControl.OnReloadNinjaScriptHotKey is not a documented/supported NinjaScript method/property and using this would go beyond the support we would be able to provide you with in the Support department at NinjaTrader.

    That said, this forum thread will be open for other community members to share their insight on the unsupported code to accomplish this.

    Something you might consider is using ForceRefresh() depending on your overall needs.

    ForceRefresh(): https://ninjatrader.com/support/help...rcerefresh.htm

    Or, you might find this forum thread about using SendKeys to be helpful: https://forum.ninjatrader.com/forum/...55#post1143755
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    80 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X