Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw object position

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

    Draw object position

    Is there a way to position of a drawn object not based on price? I want my strategy to have an annotation appear at the bottom of the first panel or a separate panel. This is what I tried but with no success:

    DrawDot("My dot" + CurrentBar, false, 0, y, Color.Blue).PanelUI = 2;

    Also I can make changes in the strategy script to change the default colors of indicators but I cannot figure out how to do this for thickness, is this possible? Thanks

    #2
    I should probably elaborate a bit, it will be a task a little bit like this:

    protected override void OnBarUpdate()
    {

    if ((ToTime(Time[0]) >= 13000 && ToTime(Time[0]) < 30000))

    {
    DrawDot("My dot" + CurrentBar, false, 0, y, Color.Blue).PanelUI = 2;
    }

    Comment


      #3
      Chris001, if you drawn in the price or non price panel would be dictated by the DrawOnPricePanel property.



      You can change the width and colors of added indicators by your strategy script, yes.

      Comment


        #4
        Hi Bertrand,

        Using the following code I get the errors in the attached csv file, which is unusual since this is exactly the same as the link to the example I was provided, minus the string name was changed.

        protected override void Initialize()
        {

        Add(new Plot(Color.Orange, "Trading Times"));
        DrawOnPricePanel = false;
        }
        Attached Files

        Comment


          #5
          Hello Chris001,

          Thank you for your response.

          DrawOnPricePanel is an indicator function, it cannot be used in a strategy. If you wish to use DrawOnPricePanel you will need to create an indicator for this and Add() the indicator in the Initialize() method of your strategy.

          Please let me know if I may be of further assistance.

          Comment


            #6
            I have got it working just fine, thank you.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            656 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            371 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            579 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X