Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

convert Sierra indy to Ninja script

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

    #16
    Hello Brian,

    After reviewing the Heken Ashi indicator itself, I was able to determine that this particular indicator erases your data series' primary bars. If you are familiar with NinjaScript, the code that does this is (emphasis mine) :

    Code:
    [FONT=Courier New]
    BarColorSeries.Set(Math.Max(0, CurrentBar + Math.Max(0, Displacement) + (CalculateOnBarClose ? 1 : 0)), [B]Color.Transparent[/B]);
       CandleOutlineColorSeries.Set(Math.Max(0, CurrentBar + Math.Max(0, Displacement) + (CalculateOnBarClose ? 1 : 0)), [B]Color.Transparent[/B]);[/FONT]
    So it appears our options are as follows :

    • Add another visible Heken Ashi indicator to panel 1 and treat this as your primary data series
    • Modify the code for Heken Ashi on your system. The way I would recommend doing this is as follows :
      • Control Center -> Tools -> Edit NinjaScript -> HeikenAshi -> OK
      • Right-Click in the Editor -> Save As -> HeikenAshiNoErase -> OK
      • Change line 57 from
        {
        to
        { /*
      • Change line 63 from

        to
        */
      • I am including a C# file where I have done this all already. You can install it by copying it to your (My) Documents\NinjaTrader 7\bin\Custom\Indicator folder, loading it through Control Center -> Edit NinjaScript -> HeikenAshiNoErase -> OK, and pressing F5
      • If you use this approach, you will use HeikenAshiNoErase instead of the built-in HeikenAshi indicator

    • Use two charts

    Please let us know if there is any other way we can help
    Attached Files
    Jessica P.NinjaTrader Customer Service

    Comment


      #17
      cheers Jessica - works perfectly. Can be overlaid on main chart window candles or set in sub-window.

      Thanks.

      Comment

      Latest Posts

      Collapse

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