Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 burtoninlondon, Today, 12:38 AM
      0 responses
      10 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      14 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      14 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,983 views
      3 likes
      Last Post jhudas88  
      Working...
      X