• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawLine

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

    DrawLine

    What is wrong in the sintax of following line:

    DrawLine("OCP", false,5, PO, -20, PO, Color.Green, DashStyle.Dash,2);

    Thanks

    #2
    Hello ocorrea,

    As far as syntax, there is nothing wrong with this line.

    The issue may be with the PO variable. Is this variable a double?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      when compile the indicator shows the msg "The name 'DashStyle' does not exist in the current context"

      Comment


        #4
        the syntax complete is:

        public void MarcaTrade(int sd, int stp, int stpl, int trg1, int trg2)
        {
        double PO = Position.AvgPrice;
        if(sd == 1)
        {
        DrawLine("OCP", false,5, PO, -20, PO, Color.Green, DashStyle.Dash,2);
        }
        return;

        Comment


          #5
          Hello,

          I am able to compile the following:
          DrawLine("OCP", false,5,0, -20,0, Color.Green, DashStyle.Dash,2);

          I've just replaced the PO with 0.

          I'd like to take a look on your end as DashStyle is a collection you can access from a strategy.

          Please send an email to platformsupport [at] ninjatrader [dot] com. In the email, please add a link to this forum thread.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Wingo, Today, 04:52 PM
          1 response
          9 views
          0 likes
          Last Post bltdavid  
          Started by Bionian, Today, 10:10 AM
          3 responses
          20 views
          0 likes
          Last Post Bionian
          by Bionian
           
          Started by D Trader, Today, 01:41 PM
          0 responses
          13 views
          0 likes
          Last Post D Trader  
          Started by rexmie888, Today, 04:00 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Started by terminatorT1000, Today, 01:23 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Working...
          X