Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategy doesn´t draw

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

    strategy doesn´t draw

    I made this strategy, but doesn´t draw anything, what is wrong.

    (I loaded it in the control center, and started it).

    thank you





    // This namespace holds all strategies and is required. Do not change it.
    namespace NinjaTrader.Strategy
    {
    /// <summary>
    /// entrar largo en base a: DM, EOM, BOP, VOL OSC, HMA, STD ERR
    /// </summary>
    [Description("entrar largo en base a: DM, EOM, BOP, VOL OSC, HMA, STD ERR")]
    public class entradalargo : Strategy
    {
    #region Variables
    // Wizard generated variables
    private int myInput0 = 1; // Default setting for MyInput0
    // User defined variables (add any user defined variables below)
    #endregion

    /// <summary>
    /// This method is used to configure the strategy and is called once before any strategy method is called.
    /// </summary>
    protected override void Initialize()
    {

    CalculateOnBarClose = true;
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    // Condition set 1
    if (DM(14).DiPlus[1] > DM(14).DiMinus[1]
    && EaseOfMovement(14, 10000)[1] > 0
    && BOP(14)[1] > 0
    && VolumeOscillator(12, 26)[1] > 0
    && HMA(10)[1] > HMA(21)[1]
    && StdError(14).Middle[1] > HMA(21)[1])
    {
    DrawArrowLine("ENTRADA" + CurrentBar, 3, High[(int) (High[0] + 2 * TickSize)] + 2 * TickSize, 0, High[0] + 5 * TickSize, Color.Blue);
    DrawDiamond("My diamond" + CurrentBar, false, 0, Close[0] + 1 * TickSize, Color.Red);
    PlaySound(@"C:\Archivos de programa\NinjaTrader 6.5\sounds\Alert3.wav");
    }
    }

    #region Properties
    [Description("")]
    [Category("Parameters")]
    public int MyInput0
    {
    get { return myInput0; }
    set { myInput0 = Math.Max(1, value); }
    }
    #endregion
    }

    #2
    Don't see anything that sticks out at a quick glance so I suggest that you debug...Make sure that the location where you call draw methods are in fact being entered. If this is the case, check the draw methods, make sure the x/y values are valid locations etc...

    Here is a debug reference that may help - http://www.ninjatrader-support.com/v...ead.php?t=3418
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    627 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    359 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    562 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    567 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X