NexusFi: Find Your Edge


Home Menu

 





need some ninjascript help


Discussion in Traders Hideout

Updated
    1. trending_up 1,041 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?
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
Hungary Called for Magyar at 97pct, Ending 16-Year Orban …
Prediction Markets & Event Contracts
April FOMC Minutes: Most Divided Fed Since 1992 -- Many …
Traders Hideout
Five Days Until the Gap Dies -- CME Goes 24/7 on All Dig …
Traders Hideout
SEC Advisory Committee Backs Tokenized Securities Exempt …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
23 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 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


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