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

Strategy Builder APZ LowerLine

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

    Strategy Builder APZ LowerLine

    Alright, I need help... why does this code not work. It's very simple and created in the strategy wizard.

    If the current price low (update on price change) drops lower than the lower APZ line of the prior bar (which already completed), then place an Arrow at this bar that is developing. I used place long order but it didn't do anything either.

    CL 8 Range Bar Chart
    APZ Band 2% Period 7


    protected override void OnBarUpdate()
    {
    if (CurrentBars[0] < 1)
    return;

    // Set 1
    if (Low[0] <= APZ1.Lower[1])
    {
    Draw.ArrowUp(this, @"ApzChoppy04Arrow up", false, 0, 3, Brushes.Lime);
    }
    Attached Files
    Last edited by tradingali; 01-10-2017, 05:15 PM.

    #2
    Hello tradingali,

    Thanks for your post.

    There are two reasons why you are not seeing the arrows.
    1) The vertical location of the arrow is identified as "3" and this would need to be changed to reflect a value that would be closer to the actual price value (CL is in the +50 range). Note: if you change your price scale on the chart so that you can see a price level of 3 you will see the arrow as drawn.
    2) The tag name is not unique for the label of the draw object. This means that only the most current arrow would be shown as previously draw arrows are removed when the tag name is not unique.
    For reference, please see the helpguide here: http://ninjatrader.com/support/helpG...aw_arrowup.htm

    As you are using the strategy builder, I've added two screenshots:
    1) How to select the Low[0] price of the bar and subtract 3 ticks below that as the vertical location to draw the up arrow.
    2) How to make the tag name unique by adding/ selecting Currentbar number to your tag name.
    Attached Files
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CortexZenUSA, Today, 12:53 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by CortexZenUSA, Today, 12:46 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by usazencortex, Today, 12:43 AM
    0 responses
    5 views
    0 likes
    Last Post usazencortex  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    168 responses
    2,265 views
    0 likes
    Last Post sidlercom80  
    Started by Barry Milan, Yesterday, 10:35 PM
    3 responses
    12 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X