protected override void OnBarUpdate()
{
//zero[0]= 0;
if (CurrentBar < Period)
return;
double lowerTimeAvg = EMA(LowerTimeSlope)[0];
double higherTimeAvg = EMA(HigherTimeSlope)[0];
double heightslope = lowerTimeAvg - higherTimeAvg;
double angleBetweenAvg = (Math.Atan(heightslope / (Period * interval)) * convert);
double slopeAvgLower = EMA(slopeAvg,LowerTimeSlope)[0];
double slopeAvgHigher = EMA(slopeAvg,HigherTimeSlope)[0];
double heightslopeofslope = slopeAvgLower - slopeAvgHigher;
double angleBetweenSlopes = (Math.Atan(heightslopeofslope / (Period * interval)) * convert);
EMA slopeofSlopeAvg = EMA((int)angleBetweenSlopes);
SlopeLine[0] = angleBetweenAvg;
if(IsRising(Value))
{
//if(ColorSlope)
PlotBrushes[0][0] = UpColor;
}
if(IsFalling(Value))
//if(degreesOutput1 < degreesOutput2)
{
//if(ColorSlope)
PlotBrushes[0][0] = DnColor;
}
Comment