Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

bar close question

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

    bar close question

    If I have a strategy that fires an entry order on a 30 minute bar and
    CalculateOnBarClose = true so that the order will be filled on the next bar how would I draw some text on the current bar 5 minutes prior to the close of the current bar? (Assuming the entry signal was fired sometime between 0 min =< t <= 25 min)

    I am aware of the DrawText() function but its the timing aspect I'm not sure about.

    Thanks.


    #2
    mballagan, you can realize this with a multiseries strategy, just add for example a 5 min series to your strategies to use the timestamps in this interval to execute your code - http://www.ninjatrader-support.com/H...struments.html
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Draw text on bar

      Thanks I have managed to figure out how to work out if 5 minutes are remaining of a 30 bar candle using an additional 5 min bar series (the primary series being 30 min) and the BarsInProgress property.

      How do I draw text actually onto a candle. I have tried using the following syntax:

      DrawText("GemShortEntry","G",0,Close[0],Color.Red);

      This doesnt seem to display anything. is the y coordinate of Close[0] wrong?

      Comment


        #4
        Great, no the Y coordinate should be good - do you see any error in the log tab of the Control Center? Are you sure the condition to DrawText triggers? Also keep in mind you need to use unique tag ID's to see the history of drawn objects.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          DrawText

          Its working fine now thanks. I was displaying red text on top of a red bar so it wasnt visible!

          Comment


            #6
            Great thanks for reporting back!
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by aligator, 01-06-2022, 12:14 PM
            4 responses
            231 views
            0 likes
            Last Post john_44573  
            Started by reynoldsn, Today, 05:56 PM
            0 responses
            3 views
            0 likes
            Last Post reynoldsn  
            Started by bortz, 11-06-2023, 08:04 AM
            51 responses
            1,986 views
            0 likes
            Last Post aligator  
            Started by dmking, 11-12-2019, 12:31 PM
            4 responses
            4,145 views
            0 likes
            Last Post jasonw
            by jasonw
             
            Started by roblogic, Today, 04:31 PM
            0 responses
            10 views
            0 likes
            Last Post roblogic  
            Working...
            X