NexusFi: Find Your Edge


Home Menu

 





need some ninjascript help


Discussion in Traders Hideout

Updated
    1. trending_up 1,069 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 hachot 
Ljubljana Slovenija
 
Experience: Master
Platform: NinjaTrader
Broker: NTB
Trading: ES
Posts: 36 since Oct 2014
Thanks Given: 26
Thanks Received: 5

Anyone knows why this ninjascript function that i have in AB tool bar buttons is not working when called from second tab, which is different wfrom which the indicator is on.

private void LineOnCloseFunc()
{
if (ChartBars.Properties.ChartStyleType == ChartStyleType.CandleStick)
{
ChartBars.Properties.ChartStyleType = ChartStyleType.LineOnClose;
}

else if (ChartBars.Properties.ChartStyleType == ChartStyleType.LineOnClose)
{
ChartBars.Properties.ChartStyleType = ChartStyleType.CandleStick;
}
chartWindow.ActiveChartControl.InvalidateVisual();
ForceRefresh();
}


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
World Cup Opens: USA at 45.5% Tonight as Markets Push Ba …
Prediction Markets & Event Contracts
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
Penalties in Budapest, Peace Deadline in Tehran: Arsenal …
Prediction Markets & Event Contracts
UCL Final Kicks Off at Noon ET: PSG at 56.5% as Iran May …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
7 thanks
Darmok and Jalad at Tanagra
1 thanks
  #2 (permalink)
 SamirOfSalem   is a Vendor
 
Posts: 77 since Jan 2020
Thanks Given: 23
Thanks Received: 49


hachot View Post
Anyone knows why this ninjascript function that i have in AB tool bar buttons is not working when called from second tab, which is different wfrom which the indicator is on.

private void LineOnCloseFunc()
{
if (ChartBars.Properties.ChartStyleType == ChartStyleType.CandleStick)
{
ChartBars.Properties.ChartStyleType = ChartStyleType.LineOnClose;
}

else if (ChartBars.Properties.ChartStyleType == ChartStyleType.LineOnClose)
{
ChartBars.Properties.ChartStyleType = ChartStyleType.CandleStick;
}
chartWindow.ActiveChartControl.InvalidateVisual();
ForceRefresh();
}

Hi hatchot.

Something similar was addressed by NinjaTrader Support some time ago.
See if this post on the NinjaTrader forum point you in the right direction.

https://forum.ninjatrader.com/forum/historical-beta-archive/version-8-beta/83991-custom-button-and-a-few-chart-tabs?p=770197#post770197


Reply With Quote
Thanked by:




Last Updated on March 27, 2024


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts