Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawHorizontalLine

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

    DrawHorizontalLine

    Hi,

    In my strategy, I would like to draw an horizontal line on the price chart (10 cents below the current price). This line should move as the price moves.

    I tried to use the DrawHorizontalLine method. However, when I open a chart, the strategy seems to work, but the line is not displayed.
    Any suggestions why the line is not displayed?

    Notes:
    1. I am connected to the simulated data feed while running the strategy.
    2. When right clicking on the chart, the strategy option is grayed out. I'm not sure whether it has anything to do with that option.

    Please assist.

    Ron

    #2
    Hi Ron, which DrawHorizontalLine call are you exactly using here? Was the strategy started from a chart or from the strategies tab?

    Comment


      #3
      Hi Bertrand

      1. I use the DrawHorizontalLine method:
      DrawHorizontalLine("LineHOrizental", stopPrice , Color.Red);
      Where stopPrice is a number I set 10 cents below the current price.
      2. The strategy was started from the strategy tab.

      Comment


        #4
        Can you please run this script then from the chart directly instead? If you started it from the tab only it would not be visualized, this is just a very efficient mode for trading the signals generated then.

        Comment


          #5
          Isn't there any way to draw on a price chart when starting a strategy from the "strategy tab"?

          Ron

          Comment


            #6
            Ron, unfortunately that's not possible as those are not visualized - they are not tied to any chart object.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            666 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            377 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            110 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            575 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            580 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X