Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

line not ploting

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

    line not ploting

    My problem is that if i use sMAP0 it will not work but if i use the sMAP1 it will but i cant change the value of it in the indicators when i add it to a chart. If someone could help me make the sMAP0 work i would greatly appreciate it.


    #region
    Variables
    // Wizard generated variables
    privateint eMAP = 14; // Default setting for EMAP
    privateint sMAP0 = 4; // Default setting for SMAP
    // User defined variables (add any user defined variables below)

    privatedouble EMAVal,SMAVal;
    privateint Displace = 0;
    privateint sMAP1 = 40;

    privatestring iAlert = "Alert1.wav";
    [Description(
    "")]
    [Category(
    "Parameters")]
    publicstring AlertString
    {
    get { return iAlert; }
    set { iAlert = value; }
    }

    #endregion

    #2
    Hello Cbart,

    Are there any error messages in the log tab of the control center?

    Can you share the whole snippet you're working with? We can take a look.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      no there isnt any errors, but here is the rest of it.
      protectedoverridevoid OnBarUpdate()
      {
      if (CurrentBar < Displace)
      return;

      EMAVal = EMA(Close, eMAP)[Displace];
      SMAVal = SMA(Close, sMAP1)[
      0];

      Plot0.Set(SMAVal);
      Plot1.Set(EMAVal);

      if(CurrentBar <= 6)
      return;

      sMA.Set(SMAVal);
      eMA.Set(EMAVal);

      if(sMA[1] > eMA[1] && sMA[0] < eMA[0])
      {
      DrawArrowDown(CurrentBar.ToString(),
      true, 0, High[0] + TickSize, Color.Red);
      PlaySound(
      @"C:\Program Files\NinjaTrader 6.5\sounds\Alert1.wav");
      }

      if(sMA[1] < eMA[1] && sMA[0] > eMA[0])
      {
      DrawArrowUp(CurrentBar.ToString(),
      true, 0, Low[0] - TickSize, Color.Blue);
      PlaySound(
      @"C:\Program Files\NinjaTrader 6.5\sounds\Alert1.wav");
      }

      Comment


        #4
        Hello cbart_1,

        If the issue is a line not plotting, please check the Initialize() method and the properties region for all the right structure. It may help to use the indicator wizard first to create your two plots and then view these sections.

        Start simple and then add complexity only when you've verified everything works as you expect.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          i got it this"
          PriceTypeSupported =
          true;" was set to false. Once i set it to true it worked

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          583 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          339 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X