Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

HeikenAshiSmoothed

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

    HeikenAshiSmoothed

    Hi,

    I saw an update for https://ninjatraderecosystem.com/use...ashi-smoothed/

    is there an example somewhere how to initialize this indicator in code/script?
    I can add it to a chart but for some reason I cannot call the indicator from my code as I cannot correctly initalize it from State.DataLoaded

    Regards
    Stefan


    #2
    Hello stefan,

    Thanks for writing in.

    You could see the code used to reference the HeikenAshiSmoothed indicator by using the Strategy Builder (New > Strategy Builder). If you open the Strategy Builder, you could create a condition in the Conditions and Actions section based on the HeikenAshiSmoothed indicator and then click the 'View code' button to see the code used to initialize the indicator.

    For example, we created a HeikenAshiSmoothed object called HeikenAshiSmoothed1 ( private HeikenAshiSmoothed HeikenAshiSmoothed1; ), we would use the following code to initialize and plot the indicator in State.DataLoaded.

    Code:
    else if (State == State.DataLoaded)
    {
        HeikenAshiSmoothed1 = HeikenAshiSmoothed(Close, Brushes.Red, Brushes.LightGreen, Brushes.Transparent, 2, 4, false, true, 34, 2, NinjaTrader.Gui.DashStyleHelper.Solid, Brushes.Blue);
        HeikenAshiSmoothed1.Plots[0].Brush = Brushes.Transparent;
        HeikenAshiSmoothed1.Plots[1].Brush = Brushes.Transparent;
        HeikenAshiSmoothed1.Plots[2].Brush = Brushes.Transparent;
        HeikenAshiSmoothed1.Plots[3].Brush = Brushes.Transparent;
        AddChartIndicator(HeikenAshiSmoothed1);
    }
    See this help guide documentation below for more information:
    https://ninjatrader.com/support/help..._builder.htm#H owToMakeIndicatorToValueComparisons

    Please let us know if we may assist further.
    <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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    599 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    344 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    558 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    557 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X