Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw arrow not working

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

    Draw arrow not working

    I have a simple strategy. I would like to have an arrow drawn and a sound played when my condition is satisfied.

    I used strategy builder to create and compile the strategy. However, when I apply the strategy to a chart, NO arrows are drawn.

    Following is the code snippet:

    if (CrossAbove(Close, SMA(60), 1)
    && DMI_JP(
    60)[0] > 0)
    {
    DrawArrowUp(
    "LONG" + CurrentBar, false, 0, 0, Color.Lime);
    PlaySound(
    @"C:\Program Files\NinjaTrader 6.5\sounds\long.wav");
    }

    Please help.

    Thanks.

    #2
    menlo, please ensure your Y Axis value for the drawing is not 0 like in your snippet -

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    125 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    85 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    105 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    85 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X