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

Inside bar for Heiken Ashi

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

    Inside bar for Heiken Ashi

    Hey there, I am new to the whole ninjascript thing but I am looking to add an indicator to my Heiken Ashi bars. I would like the bar to change color if it is an inside bar, the high of the current bar is lower than the high of the previous bar and the low of the current bar is higher than the low of the previous bar.

    Also I would like the same indication if the body of the current bar is inside the body of the previous bar regardless of the highs and lows.

    It sems like it should be pretty simple to work out but I dont see how to input these values in the indicator wizard without typing out the code.

    Has anyone seen something like this out there?

    Thanks

    #2
    Hello uspilotzzz,
    Thanks for posting this morning.

    This would not be able to be done using the indicator wizard. This would have to be done with custom coding outside of the indicator wizard.

    From the HeikenAshi Indicator built into NinjaTrader you could modify the color of the bars based on different comparisons of the Open High Low and Close data series values built into the HeikenAshi indicator.

    Under the Plot override function you can see that the HeikenAshi is drawn using values from different plots such as the HAHigh, HALow, HAClose, and HAOpen. Here is where you could run your comparisons and then change the color of that particular bar.

    For example if you wanted to know if it was "inside" the previous bar you could check if the previous bars open and close are greater than the currentBars open and close. Then on the graphics.DrawLine() method change the color of the pen based on your condition seen.

    Please let us know if we may be of further assistance for anything NinjaTrader.
    Alex G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bmartz, 03-12-2024, 06:12 AM
    5 responses
    32 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by Aviram Y, Today, 05:29 AM
    4 responses
    12 views
    0 likes
    Last Post Aviram Y  
    Started by algospoke, 04-17-2024, 06:40 PM
    3 responses
    28 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by gentlebenthebear, Today, 01:30 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by cls71, Today, 04:45 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X