• 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

Ema Std dev

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

  • Dyversity
    replied
    Problem solved!!
    Thanks for the reply

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello Dyversity,

    Thanks for your post and welcome to the forums.

    When you copied the code, did you also copy the information in the area of #region Properties?
    The information would be between #region Properties and #endregion.

    Leave a comment:


  • Dyversity
    started a topic Ema Std dev

    Ema Std dev

    Hi

    Ive copied the bollinger code and changed the sma to ema but get loads of errors

    This is my code

    #region Variables
    // Wizard generated variables
    // User defined variables (add any user defined variables below)
    private double numStdDev = 3.5;
    private int period = 55;
    #endregion

    /// <summary>
    /// This method is used to configure the indicator and is called once before any bar data is loaded.
    /// </summary>
    protected override void Initialize()
    {
    Add(new Plot(Color.Black, "Upper band"));
    Add(new Plot(Color.Blue, "Middle band"));
    Add(new Plot(Color.Black, "Lower band"));
    Overlay = true;
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {

    double emaValue = EMA(Period)[0];
    double stdDevValue = StdDev(EMA,Period)[0];
    Upper.Set(emaValue + NumStdDev * stdDevValue);
    Middle.Set(emaValue);
    Lower.Set(emaValue - NumStdDev * stdDevValue);

    i seem to get errors for the last 5 line of code with cs1503,0118,1502 and NT1503 errors.
    Anyone show me where im going wrong?
    Thanks

Latest Posts

Collapse

Topics Statistics Last Post
Started by DTSSTS, Today, 01:26 PM
0 responses
5 views
0 likes
Last Post DTSSTS
by DTSSTS
 
Started by RFrosty, Today, 01:20 PM
0 responses
7 views
0 likes
Last Post RFrosty
by RFrosty
 
Started by Newtrader101, Today, 12:59 PM
4 responses
11 views
0 likes
Last Post Newtrader101  
Started by Bmatarese, Today, 11:08 AM
1 response
16 views
0 likes
Last Post NinjaTrader_Heath  
Started by aligator, Today, 11:16 AM
3 responses
12 views
0 likes
Last Post NinjaTrader_Heath  
Working...
X