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 bortz, 11-06-2023, 08:04 AM
    47 responses
    1,606 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    8 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    4 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    13 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X