예제 #1
0
 protected override void CalcBar()
 {
     m_chaikinoscval.Value = m_chaikinosc1[0];
     Plot1.Set(0, m_chaikinoscval.Value);
     Plot2.Set(0, 0);
     if ((Color.Empty != upcolor && Color.Empty != dncolor))
     {
         var m_colorlevel = m_normgradientcolor1[0];
         if ((m_applicationtype == 1))
         {
             Plot1.Colors[0] = m_colorlevel;
         }
         else
         {
             if (m_applicationtype > 1)
             {
                 Plot1.Colors[0] = gridforegroundcolor;
                 Plot1.BGColor   = m_colorlevel;
             }
         }
     }
     if (((Bars.Close.LowestBar(alertlength) == 0) &&
          PublicFunctions.DoubleGreater(m_chaikinoscval.LowestBar(alertlength), 0)))
     {
         Alerts.Alert("Bullish divergence - new low not confirmed");
     }
     else
     {
         if (((Bars.Close.HighestBar(alertlength) == 0) &&
              PublicFunctions.DoubleGreater(m_chaikinoscval.HighestBar(alertlength), 0)))
         {
             Alerts.Alert("Bearish divergence - new high not confirmed");
         }
     }
 }
 protected override void CalcBar()
 {
     m_moneyflowval.Value = Bars.MoneyFlow(length);
     Plot1.Set(0, m_moneyflowval.Value);
     Plot2.Set(0, overbought);
     Plot3.Set(0, oversold);
     if (PublicFunctions.DoubleGreater(m_moneyflowval.Value, overbought))
     {
         Plot1.Colors[0] = overbcolor;
     }
     else
     {
         if (PublicFunctions.DoubleLess(m_moneyflowval.Value, oversold))
         {
             Plot1.Colors[0] = overscolor;
         }
     }
     if (((Bars.Close.LowestBar(alertlength) == 0) &&
          PublicFunctions.DoubleGreater(m_moneyflowval.LowestBar(alertlength), 0)))
     {
         Alerts.Alert("Bullish divergence - new low not confirmed");
     }
     else
     {
         if (((Bars.Close.HighestBar(alertlength) == 0) &&
              PublicFunctions.DoubleGreater(m_moneyflowval.HighestBar(alertlength), 0)))
         {
             Alerts.Alert("Bearish divergence - new high not confirmed");
         }
     }
 }
예제 #3
0
        protected override void CalcBar()
        {
            m_roc.Value = price.RateOfChange(roclength);
            Plot1.Set(0, m_roc.Value);
            Plot2.Set(0, 0);
            var m_colorlevel = m_normgradientcolor1[0];

            if (((int)Environment.ApplicationCode == 1))
            {
                Plot1.Colors[0] = m_colorlevel;
            }
            else
            {
                if ((int)Environment.ApplicationCode > 1)
                {
                    Plot1.Colors[0] = gridforegroundcolor;
                    Plot1.BGColor   = m_colorlevel;
                }
            }

            if ((m_roc.HighestBar(alertlength) == 0))
            {
                Alerts.Alert("Indicator at high");
            }
            else
            {
                if ((m_roc.LowestBar(alertlength) == 0))
                {
                    Alerts.Alert("Indicator at low");
                }
            }
        }
        protected override void CalcBar()
        {
            m_mktfacilx.Value = Bars.MFI();
            Plot1.Set(0, m_mktfacilx.Value);

            if (m_mktfacilx.HighestBar(alertlength) == 0)
            {
                Alerts.Alert("Indicator at high");
            }
            else{
                if (m_mktfacilx.LowestBar(alertlength) == 0){
                    Alerts.Alert("Indicator at low");
                }
            }
        }
예제 #5
0
 protected override void CalcBar()
 {
     m_atr.Value = this.AverageTrueRange(atrlength);
     Plot1.Set(0, m_atr.Value);
     if ((m_atr.HighestBar(alertlength) == 0))
     {
         Alerts.Alert("Indicator at high");
     }
     else
     {
         if ((m_atr.LowestBar(alertlength) == 0))
         {
             Alerts.Alert("Indicator at low");
         }
     }
 }
예제 #6
0
 protected override void CalcBar()
 {
     m_obvvalue.Value = m_obv1[0];
     Plot1.Set(0, m_obvvalue.Value);
     if (((Bars.Close.LowestBar(alertlength) == 0) &&
          PublicFunctions.DoubleGreater(m_obvvalue.LowestBar(alertlength), 0)))
     {
         Alerts.Alert("Bullish divergence - new low not confirmed");
     }
     else
     {
         if (((Bars.Close.HighestBar(alertlength) == 0) &&
              PublicFunctions.DoubleGreater(m_obvvalue.HighestBar(alertlength), 0)))
         {
             Alerts.Alert("Bearish divergence - new high not confirmed");
         }
     }
 }
예제 #7
0
 protected override void CalcBar()
 {
     if (Bars.CurrentBar == 1)
     {
         m_applicationtype.Value = (Int32)Environment.ApplicationCode;
     }
     m_hpivalue.Value = m_hpi1[0] * 1E-05;
     Plot1.Set(0, m_hpivalue.Value);
     Plot2.Set(0, 0);
     if (Color.Empty != upcolor && Color.Empty != dncolor)
     {
         m_colorlevel = m_normgradientcolor1[0];
         if (m_applicationtype.Value == 1)
         {
             Plot1.Colors[0] = m_colorlevel;
         }
         else
         {
             if (m_applicationtype.Value > 1)
             {
                 Plot1.Colors[0] = gridforegroundcolor;
                 Plot1.BGColor   = m_colorlevel;
             }
         }
     }
     if (Bars.Close.LowestBar(alertlength) == 0 &&
         PublicFunctions.DoubleGreater(m_hpivalue.LowestBar(alertlength), 0))
     {
         Alerts.Alert("Bullish divergence - new low not confirmed");
     }
     else
     {
         if (Bars.Close.HighestBar(alertlength) == 0 &&
             PublicFunctions.DoubleGreater(m_hpivalue.HighestBar(alertlength), 0))
         {
             Alerts.Alert("Bearish divergence - new high not confirmed");
         }
     }
 }