Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM Strategy and drawing objects

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

    ATM Strategy and drawing objects

    Hello

    I have an ATM strategy that works fine. I want to use any drawing tool to point the signal bar but I can't. Only Barbrush and CandleOutlineBrush work.

    BarBrush = Brushes.Fuchsia;
    CandleOutlineBrush = Brushes.Fuchsia;
    Draw.Text(this, "Great"+CurrentBar, false, @"O", 0, High[0] + 8 * TickSize , 0, Brushes.Fuchsia, largeFont, TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 0);

    As you can see in image attached, text is drawn but in a fix level. How can I fix that?

    Thanks

    Attached Files

    #2
    Hello Impeesa,

    The Text is set to be drawn 8 ticks above the high of the most recent bar.

    Where you do want the text drawn instead?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      The text is drawn 8 ticks above Open RTH... I would like to draw 8 ticks above the bar where conditions are met, as BarBrush does

      Comment


        #4
        Hello Impeesa,

        The code you have written for the price is:

        High[0] + 8 * TickSize

        That's the High of the most recently updated bar plus 8 ticks.

        At what price were the conditions met? Add 8 ticks to that price.
        Code:
        myDoubleConditionPrice = 1000;
        
        if (Close > myDoubleConditionPrice)
        {
        Draw.Text(this, "Great"+CurrentBar, false, @"O", 0, myDoubleConditionPrice + 8 * TickSize , 0, Brushes.Fuchsia, largeFont, TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 0);
        }
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          As you can see, the price that is taken as reference is Opening Price and I can not understand why...
          Attached Files

          Comment


            #6
            Hello Impeesa,

            A drawing object will be drawn at the price supplied to it.

            Print the time and the high one line above the Draw method call.

            Below is a link to a forum post that demonstrates using prints to understand behavior.
            https://ninjatrader.com/support/foru...121#post791121

            I'm suspicious this script has multipile series, so I am including the BarsInProgress as well.

            Print(string.Format("{0} | BarsInProgress: {1}, High[0]: {2}", Time[0], BarsInProgress, High[0]));

            Please include the output from the print with your next post.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            50 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            126 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            69 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            42 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            46 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X