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 martyn73, 09-06-2019, 01:27 PM
    3 responses
    209 views
    0 likes
    Last Post trades4x  
    Started by Ripoz4200, 01-29-2024, 03:21 PM
    6 responses
    2,316 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Started by paulmuldoon, 09-03-2024, 08:24 PM
    5 responses
    63 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Started by markjaffe, Today, 12:57 PM
    0 responses
    7 views
    0 likes
    Last Post markjaffe  
    Started by arbeydario, 09-03-2024, 08:37 PM
    4 responses
    36 views
    0 likes
    Last Post arbeydario  
    Working...
    X