Speed Oscillator - MetaTrader 5 Script | Trading Script Download - MT4/MT5 Resources - MetaTrader 5 Resources

Measures the moving average speed of the current bar, relative to the average of # (averaging periods) past bars.
This oscillator can be intuitively described as a velocity indicator .
current bar speed/ means past speed # bars
AvgPosBuffer[i] = pos_sum/InpSPeriod;
AvgNegBuffer[i] = neg_sum/InpSPeriod;
if(ExtMABuffer[i] - ExtMABuffer[i-1]>0)
{
SO[i] = (ExtMABuffer[i]-ExtMABuffer[i-1]) / AvgPosBuffer[i];
}
Otherwise if(ExtMABuffer[i] - ExtMABuffer[i-1]<0)
{
SO[i] = -((ExtMABuffer[i]-ExtMABuffer[i-1]) / AvgNegBuffer[i]);
}
otherwise{
SO[i] = 0;
}Moving Average(9)
Average period(120)

Attachment download
📎speedoscillatorv2.2.mq5 (5.77 KB)
Source: MQL5 #35277
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •