Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Programming Ques on multi timeframes

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

    Programming Ques on multi timeframes

    I have highlighted the onbarupdate. That section seems to be the issue. I have attached the output window data.
    On the update all values for the stoch are < 25. That is good.
    However, the time sometimes repeats. In other words, there are duplicate times with different stoch values.
    I load a stoc indicator on the chart and try to match up the chart reading with what is in the output window. Most of the time I can match up the data. Once in a while, I can't. If there is a dup time things go haywire. Sometimes the value on the chart stoch for a given time will not match the output window.
    Can someone steer me in the right direction?

    protectedoverridevoid Initialize()
    {

    /// primary chart will be 5 min with index = 0

    ///15 min chart index=1
    Add(PeriodType.Minute,60);

    CalculateOnBarClose = true;


    }

    ///<summary>
    /// Called on each bar update event (incoming tick)
    ///</summary>
    protectedoverridevoid OnBarUpdate()
    {
    if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired)
    return;
    // Condition set 1
    if ((Stochastics(3, 5, 2).K[0] < 25) && (Stochastics(BarsArray[1],3, 5,2).K[0] < 25 ))
    {
    Print(Time[0].ToString() + " " + Stochastics(3, 5,2).K[0]);
    //Print(Stochastics(3, 5,2).K[0]) ;
    //Print("");
    //Print(wordOne.ToString() + wordTwo.ToString());
    DrawDiamond("My diamond" + Close[0], false, 0, Low[0] + -2 * TickSize, Color.Blue);



    Thank you,
    Duke

    Attached Files
    Last edited by dukeb; 08-05-2012, 10:01 AM. Reason: Additional information

    #2
    duke,

    If you are working on the same item, please keep all your replies in the same thread. This allows us to keep track of what is going on, as well as other people to follow your progress. It can help others out in the future.

    Could you outline for me what happened before you got to this point?
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      I am trying to create a multi time strategy that will perform the 'If statement' properly.
      I want a diamond to mark the bar where the if statement is true. I will then send an email.
      This strategy will be loaded on the 20 min chart (primary) and will add the 60 min chart (index 1).
      The if statement seems to be OK. But the time and the placement of the diamond do not seem to be working properly.

      Comment


        #4
        Originally posted by dukeb View Post
        I am trying to create a multi time strategy that will perform the 'If statement' properly.
        I want a diamond to mark the bar where the if statement is true. I will then send an email.
        This strategy will be loaded on the 20 min chart (primary) and will add the 60 min chart (index 1).
        The if statement seems to be OK. But the time and the placement of the diamond do not seem to be working properly.
        Before your if

        Print ( "BIP=" + BarsInProgress + " Stoch-20min="+ Stochastics(3, 5, 2).K[0] +" Stock-60min=" + (Stochastics(BarsArray[1],3, 5,2).K[0] + " Time[0]=" + Time[0].ToString() + " Time[1]=" + Time[1].ToString() );

        You'll see BIP either a 0 or 1.

        BIP=0 is your 20 min
        BIP=1 is your 60 min

        Re-read multi timeframe in the help to understand better,
        and finally restart your NT before doing more testing (as this might clear some things up).





        Comment


          #5
          Thank you, Sledge...
          I will do this. I will get back to, with what I am sure will be more questions. I will re-read the section you reference.
          Duke

          Comment


            #6
            Multi Time frame programming/data issues

            I put your stmt above and below the if statement. I put the word "After=" to differentiate. It is attached.
            I get the idea about the look back when 20 min bars are forming. Every time BP=1, the stoch readings are the same. This makes sense. But the times are different. I also don't understand why the t(1) time is not always on the hour. .

            Also look at the attachment. Date 7/31 t(0)=2am. The value(0)= 18.51. When I check this on a EUR/USD 20 min chart the value is 34.37. The hour also does not agree.

            Really confused.

            Duke
            Attached Files

            Comment


              #7
              Originally posted by dukeb View Post
              I put your stmt above and below the if statement. I put the word "After=" to differentiate. It is attached.
              I get the idea about the look back when 20 min bars are forming. Every time BP=1, the stoch readings are the same. This makes sense. But the times are different. I also don't understand why the t(1) time is not always on the hour. .

              Also look at the attachment. Date 7/31 t(0)=2am. The value(0)= 18.51. When I check this on a EUR/USD 20 min chart the value is 34.37. The hour also does not agree.

              Really confused.

              Duke
              Examine the new code, and the new print statement I added, and the chart.

              When BIP =1, that becomes the main series on the call back. (The 60 minute) That's why they are "equal" as you saw. If you use BarsArray[0] you get the 20 minute stoch.(The new print statement should show you this difference). I didn't put in labels on them, but you'll figure it out.


              BIP=0 Stoch-20min=24.9999999999958 Stock-60min=16.6666666666652 Time[0]=2/8/2012 12:00:00 AM Time[1]=2/7/2012 11:40:00 PM
              2/8/2012 12:00:00 AM 24.9999999999958 24.9999999999958 16.6666666666652
              BIP=1 Stoch-20min=16.6666666666652 Stock-60min=16.6666666666652 Time[0]=2/8/2012 12:00:00 AM Time[1]=2/7/2012 11:00:00 PM
              2/8/2012 12:00:00 AM 24.9999999999958 16.6666666666652 16.6666666666652




              Code:
              #region Using declarations
              using System;
              using System.ComponentModel;
              using System.Diagnostics;
              using System.Drawing;
              using System.Drawing.Drawing2D;
              using System.Xml.Serialization;
              using NinjaTrader.Cbi;
              using NinjaTrader.Data;
              using NinjaTrader.Gui.Chart;
              #endregion
              
              // This namespace holds all indicators and is required. Do not change it.
              namespace NinjaTrader.Indicator
              {
                  /// <summary>
                  /// Enter the description of your new custom indicator here
                  /// </summary>
                  [Description("Enter the description of your new custom indicator here")]
                  public class stoch1 : Indicator
                  {
                      #region Variables
                      // Wizard generated variables
                          private int myInput0 = 1; // Default setting for MyInput0
                      // User defined variables (add any user defined variables below)
                      #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()
                      {
                          /// primary chart will be 5 min with index = 0
                          ///15 min chart index=1
                          Add(PeriodType.Minute,60);
              
              
                          CalculateOnBarClose = true;
                      }
              
                      ///<summary>
                      /// Called on each bar update event (incoming tick)
                      ///</summary>
                      protected override void  OnBarUpdate()
                      {
                          if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired)
                              return;
                          // Condition set 1
              
                          Print ( "BIP=" + BarsInProgress + 
                                  " Stoch-20min="+ Stochastics(3, 5, 2).K[0] +
                                  " Stock-60min=" + Stochastics(BarsArray[1],3, 5,2).K[0] + 
                                  " Time[0]=" + Time[0].ToString() + " Time[1]=" + Time[1].ToString() );
                          
                          if ((Stochastics(3, 5, 2).K[0] < 25) && (Stochastics(BarsArray[1],3, 5,2).K[0] < 25 ))
                          {
                              Print(Time[0].ToString() + " " + Stochastics(BarsArray[0],3, 5,2).K[0]  +" " + Stochastics(3, 5,2).K[0] + " " + (Stochastics(BarsArray[1],3, 5,2).K[0]  ));
                              //Print(Stochastics(3, 5,2).K[0]) ;
                              //Print("");
                              //Print(wordOne.ToString() + wordTwo.ToString());
                              DrawDiamond("My diamond" + Close[0], false, 0, Low[0] + -2 * TickSize, Color.Blue);        
                              //Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
                              Overlay                = false;
                          }
                      }
              
              
                      #region Properties
                      [Browsable(false)]    // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
                      [XmlIgnore()]        // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
                      public DataSeries Plot0
                      {
                          get { return Values[0]; }
                      }
              
                      [Description("")]
                      [GridCategory("Parameters")]
                      public int MyInput0
                      {
                          get { return myInput0; }
                          set { myInput0 = Math.Max(1, value); }
                      }
                      #endregion
                  }
              }
              
              #region NinjaScript generated code. Neither change nor remove.
              // This namespace holds all indicators and is required. Do not change it.
              namespace NinjaTrader.Indicator
              {
                  public partial class Indicator : IndicatorBase
                  {
                      private stoch1[] cachestoch1 = null;
              
                      private static stoch1 checkstoch1 = new stoch1();
              
                      /// <summary>
                      /// Enter the description of your new custom indicator here
                      /// </summary>
                      /// <returns></returns>
                      public stoch1 stoch1(int myInput0)
                      {
                          return stoch1(Input, myInput0);
                      }
              
                      /// <summary>
                      /// Enter the description of your new custom indicator here
                      /// </summary>
                      /// <returns></returns>
                      public stoch1 stoch1(Data.IDataSeries input, int myInput0)
                      {
                          if (cachestoch1 != null)
                              for (int idx = 0; idx < cachestoch1.Length; idx++)
                                  if (cachestoch1[idx].MyInput0 == myInput0 && cachestoch1[idx].EqualsInput(input))
                                      return cachestoch1[idx];
              
                          lock (checkstoch1)
                          {
                              checkstoch1.MyInput0 = myInput0;
                              myInput0 = checkstoch1.MyInput0;
              
                              if (cachestoch1 != null)
                                  for (int idx = 0; idx < cachestoch1.Length; idx++)
                                      if (cachestoch1[idx].MyInput0 == myInput0 && cachestoch1[idx].EqualsInput(input))
                                          return cachestoch1[idx];
              
                              stoch1 indicator = new stoch1();
                              indicator.BarsRequired = BarsRequired;
                              indicator.CalculateOnBarClose = CalculateOnBarClose;
              #if NT7
                              indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
                              indicator.MaximumBarsLookBack = MaximumBarsLookBack;
              #endif
                              indicator.Input = input;
                              indicator.MyInput0 = myInput0;
                              Indicators.Add(indicator);
                              indicator.SetUp();
              
                              stoch1[] tmp = new stoch1[cachestoch1 == null ? 1 : cachestoch1.Length + 1];
                              if (cachestoch1 != null)
                                  cachestoch1.CopyTo(tmp, 0);
                              tmp[tmp.Length - 1] = indicator;
                              cachestoch1 = tmp;
                              return indicator;
                          }
                      }
                  }
              }
              
              // This namespace holds all market analyzer column definitions and is required. Do not change it.
              namespace NinjaTrader.MarketAnalyzer
              {
                  public partial class Column : ColumnBase
                  {
                      /// <summary>
                      /// Enter the description of your new custom indicator here
                      /// </summary>
                      /// <returns></returns>
                      [Gui.Design.WizardCondition("Indicator")]
                      public Indicator.stoch1 stoch1(int myInput0)
                      {
                          return _indicator.stoch1(Input, myInput0);
                      }
              
                      /// <summary>
                      /// Enter the description of your new custom indicator here
                      /// </summary>
                      /// <returns></returns>
                      public Indicator.stoch1 stoch1(Data.IDataSeries input, int myInput0)
                      {
                          return _indicator.stoch1(input, myInput0);
                      }
                  }
              }
              
              // This namespace holds all strategies and is required. Do not change it.
              namespace NinjaTrader.Strategy
              {
                  public partial class Strategy : StrategyBase
                  {
                      /// <summary>
                      /// Enter the description of your new custom indicator here
                      /// </summary>
                      /// <returns></returns>
                      [Gui.Design.WizardCondition("Indicator")]
                      public Indicator.stoch1 stoch1(int myInput0)
                      {
                          return _indicator.stoch1(Input, myInput0);
                      }
              
                      /// <summary>
                      /// Enter the description of your new custom indicator here
                      /// </summary>
                      /// <returns></returns>
                      public Indicator.stoch1 stoch1(Data.IDataSeries input, int myInput0)
                      {
                          if (InInitialize && input == null)
                              throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");
              
                          return _indicator.stoch1(input, myInput0);
                      }
                  }
              }
              #endregion
              Attached Files

              Comment


                #8
                How are these different?
                Stochastics(BarsArray[0],3, 5,2).K[0] +" " + Stochastics(3, 5,2).K[0]
                I thought that by not specifying the [0] in barsarray that we would still get the index of 0.
                I will create a new strategy with all your new code.
                I really appreciate this. Since you wrote it, I am sure it works. However, I will probably need some explanation as time goes on to understand since I am new to this.
                Very much appreciated ...
                Best regards,
                Duke

                Comment


                  #9
                  Originally posted by dukeb View Post
                  How are these different?
                  Stochastics(BarsArray[0],3, 5,2).K[0] +" " + Stochastics(3, 5,2).K[0]
                  I thought that by not specifying the [0] in barsarray that we would still get the index of 0.
                  I will create a new strategy with all your new code.
                  I really appreciate this. Since you wrote it, I am sure it works. However, I will probably need some explanation as time goes on to understand since I am new to this.
                  Very much appreciated ...
                  Best regards,
                  Duke
                  Stochastics(3,5,2).K[0] is for whatever BarsInProgress ( 0 or 1 ) that is occurring. This is either the 20 or 60 minutes.

                  Stochastics(BarsArray[0],3, 5,2).K[0] is always for your 20 minutes.
                  Stochastics(BarsArray[1],3, 5,2).K[0] is always for your 60 minutes.

                  You could put in

                  if ( BarsInProgress!=0) return;

                  then no 60 minute bars will be processed, and you'll never see the BIP=1 and where it is equal.

                  Comment


                    #10
                    That explains a lot... thank you, Sledge.....

                    Comment


                      #11
                      Multi Time data issues remain

                      Originally posted by dukeb View Post
                      That explains a lot... thank you, Sledge.....
                      I have attached an output file and a screen shot of a 20min eur/usd chart.
                      The screen shot is the time frame of the highlighted msg below from the output file.
                      The stoch value on the chart do not match the value from the data below. See attached png.
                      I have altered the code per your last message. It is below.
                      Could someone tell me how to do scrollable code and place the png file in the lower left? Sledge did this and it was very convenient.


                      BIP=0 Stoch-20min=59.3137254901886 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:00:00 AM Time[1]=7/3/2012 4:40:00 AM
                      BIP=1 Stoch-20min=16.0876757650937 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:00:00 AM Time[1]=7/3/2012 4:00:00 AM
                      7/3/2012 5:00:00 AM 59.3137254901886 16.0876757650937 16.0876757650937
                      BIP=0 Stoch-20min=27.1708683473356 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:20:00 AM Time[1]=7/3/2012 5:00:00 AM

                      protectedoverridevoid OnBarUpdate()
                      {
                      if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired)
                      return;
                      // Condition set 1
                      Print ( "BIP=" + BarsInProgress +
                      " Stoch-20min="+ Stochastics(3, 5, 2).K[0] +
                      " Stock-60min=" + Stochastics(BarsArray[1],3, 5,2).K[0] +
                      " Time[0]=" + Time[0].ToString() + " Time[1]=" + Time[1].ToString() );

                      if ((Stochastics(3, 5, 2).K[0] < 25) && (Stochastics(BarsArray[1],3, 5,2).K[0] < 25 ))
                      {
                      Print(Time[0].ToString() + " " + Stochastics(BarsArray[0],3, 5,2).K[0] +" " + Stochastics(3, 5,2).K[0] + " " + (Stochastics(BarsArray[1],3, 5,2).K[0] ));
                      //Print(Stochastics(3, 5,2).K[0]) ;
                      //Print("");
                      //Print(wordOne.ToString() + wordTwo.ToString());
                      DrawDiamond("My diamond" + Close[0], false, 0, Low[0] + -2 * TickSize, Color.Blue);
                      //Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
                      //Overlay = false;
                      }

                      }





                      Regards,
                      Duke
                      Attached Files

                      Comment


                        #12
                        Wrong png pls disregard will send again

                        Originally posted by dukeb View Post
                        I have attached an output file and a screen shot of a 20min eur/usd chart.
                        The screen shot is the time frame of the highlighted msg below from the output file.
                        The stoch value on the chart do not match the value from the data below. See attached png.
                        I have altered the code per your last message. It is below.
                        Could someone tell me how to do scrollable code and place the png file in the lower left? Sledge did this and it was very convenient.


                        BIP=0 Stoch-20min=59.3137254901886 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:00:00 AM Time[1]=7/3/2012 4:40:00 AM
                        BIP=1 Stoch-20min=16.0876757650937 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:00:00 AM Time[1]=7/3/2012 4:00:00 AM
                        7/3/2012 5:00:00 AM 59.3137254901886 16.0876757650937 16.0876757650937
                        BIP=0 Stoch-20min=27.1708683473356 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:20:00 AM Time[1]=7/3/2012 5:00:00 AM

                        protectedoverridevoid OnBarUpdate()
                        {
                        if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired)
                        return;
                        // Condition set 1
                        Print ( "BIP=" + BarsInProgress +
                        " Stoch-20min="+ Stochastics(3, 5, 2).K[0] +
                        " Stock-60min=" + Stochastics(BarsArray[1],3, 5,2).K[0] +
                        " Time[0]=" + Time[0].ToString() + " Time[1]=" + Time[1].ToString() );

                        if ((Stochastics(3, 5, 2).K[0] < 25) && (Stochastics(BarsArray[1],3, 5,2).K[0] < 25 ))
                        {
                        Print(Time[0].ToString() + " " + Stochastics(BarsArray[0],3, 5,2).K[0] +" " + Stochastics(3, 5,2).K[0] + " " + (Stochastics(BarsArray[1],3, 5,2).K[0] ));
                        //Print(Stochastics(3, 5,2).K[0]) ;
                        //Print("");
                        //Print(wordOne.ToString() + wordTwo.ToString());
                        DrawDiamond("My diamond" + Close[0], false, 0, Low[0] + -2 * TickSize, Color.Blue);
                        //Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
                        //Overlay = false;
                        }

                        }





                        Regards,
                        Duke
                        I sent the wrong png file ... will send post again.

                        Comment


                          #13
                          Multi Time data issue (continued)

                          Originally posted by dukeb View Post
                          I sent the wrong png file ... will send post again.
                          have attached an output file and a screen shot of a 20min eur/usd chart.
                          The screen shot is the time frame of the highlighted msg below from the output file.
                          The stoch value on the chart do not match the value from the data below. See attached png.
                          I have altered the code per your last message. It is below.
                          Could someone tell me how to do scrollable code [ATTACH]output.txt[/ATTACH]? Sledge did this and it was very convenient.


                          BIP=0 Stoch-20min=59.3137254901886 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:00:00 AM Time[1]=7/3/2012 4:40:00 AM
                          BIP=1 Stoch-20min=16.0876757650937 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:00:00 AM Time[1]=7/3/2012 4:00:00 AM
                          7/3/2012 5:00:00 AM 59.3137254901886 16.0876757650937 16.0876757650937
                          BIP=0 Stoch-20min=27.1708683473356 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:20:00 AM Time[1]=7/3/2012 5:00:00 AM

                          protectedoverridevoid OnBarUpdate()
                          {
                          if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired)
                          return;
                          // Condition set 1
                          Print ( "BIP=" + BarsInProgress +
                          " Stoch-20min="+ Stochastics(3, 5, 2).K[0] +
                          " Stock-60min=" + Stochastics(BarsArray[1],3, 5,2).K[0] +
                          " Time[0]=" + Time[0].ToString() + " Time[1]=" + Time[1].ToString() );

                          if ((Stochastics(3, 5, 2).K[0] < 25) && (Stochastics(BarsArray[1],3, 5,2).K[0] < 25 ))
                          {
                          Print(Time[0].ToString() + " " + Stochastics(BarsArray[0],3, 5,2).K[0] +" " + Stochastics(3, 5,2).K[0] + " " + (Stochastics(BarsArray[1],3, 5,2).K[0] ));
                          //Print(Stochastics(3, 5,2).K[0]) ;
                          //Print("");
                          //Print(wordOne.ToString() + wordTwo.ToString());
                          DrawDiamond("My diamond" + Close[0], false, 0, Low[0] + -2 * TickSize, Color.Blue);
                          //Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
                          //Overlay = false;
                          }

                          }





                          Regards,
                          Duke
                          Attached Files

                          Comment


                            #14
                            The output looks correct here. As i said before, when bip=1, it is the main data series and the only way to get the 20 min stoch is barsarray[0].

                            There are post modifies at the top for the advanced reply. Highlight your text, and choose one. # formats for code,etc.




                            Originally posted by dukeb View Post
                            have attached an output file and a screen shot of a 20min eur/usd chart.
                            The screen shot is the time frame of the highlighted msg below from the output file.
                            The stoch value on the chart do not match the value from the data below. See attached png.
                            I have altered the code per your last message. It is below.
                            Could someone tell me how to do scrollable code [ATTACH][ATTACH]22826[/ATTACH][/ATTACH]? Sledge did this and it was very convenient.


                            BIP=0 Stoch-20min=59.3137254901886 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:00:00 AM Time[1]=7/3/2012 4:40:00 AM
                            BIP=1 Stoch-20min=16.0876757650937 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:00:00 AM Time[1]=7/3/2012 4:00:00 AM
                            7/3/2012 5:00:00 AM 59.3137254901886 16.0876757650937 16.0876757650937
                            BIP=0 Stoch-20min=27.1708683473356 Stock-60min=16.0876757650937 Time[0]=7/3/2012 5:20:00 AM Time[1]=7/3/2012 5:00:00 AM

                            protectedoverridevoid OnBarUpdate()
                            {
                            if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired)
                            return;
                            // Condition set 1
                            Print ( "BIP=" + BarsInProgress +
                            " Stoch-20min="+ Stochastics(3, 5, 2).K[0] +
                            " Stock-60min=" + Stochastics(BarsArray[1],3, 5,2).K[0] +
                            " Time[0]=" + Time[0].ToString() + " Time[1]=" + Time[1].ToString() );

                            if ((Stochastics(3, 5, 2).K[0] < 25) && (Stochastics(BarsArray[1],3, 5,2).K[0] < 25 ))
                            {
                            Print(Time[0].ToString() + " " + Stochastics(BarsArray[0],3, 5,2).K[0] +" " + Stochastics(3, 5,2).K[0] + " " + (Stochastics(BarsArray[1],3, 5,2).K[0] ));
                            //Print(Stochastics(3, 5,2).K[0]) ;
                            //Print("");
                            //Print(wordOne.ToString() + wordTwo.ToString());
                            DrawDiamond("My diamond" + Close[0], false, 0, Low[0] + -2 * TickSize, Color.Blue);
                            //Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
                            //Overlay = false;
                            }

                            }





                            Regards,
                            Duke

                            Comment


                              #15
                              I guess I do not understand. The highlighted data in my previous post compared with the stoch on the graph that was attached do not match. A diamond on the 20min chart was also place at this time. The stoch was > 25 which would mean it should not have been allowed through the if stmt.
                              What am I not understanding? How can the code be correct?
                              Regards,
                              Duke

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by gemify, 11-11-2022, 11:52 AM
                              6 responses
                              803 views
                              2 likes
                              Last Post ultls
                              by ultls
                               
                              Started by ScottWalsh, Today, 04:52 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by ScottWalsh, Today, 04:29 PM
                              0 responses
                              7 views
                              0 likes
                              Last Post ScottWalsh  
                              Started by rtwave, 04-12-2024, 09:30 AM
                              2 responses
                              22 views
                              0 likes
                              Last Post rtwave
                              by rtwave
                               
                              Started by tsantospinto, 04-12-2024, 07:04 PM
                              5 responses
                              70 views
                              0 likes
                              Last Post tsantospinto  
                              Working...
                              X