SpeedTick
Download scriptThe SpeedTick indicator is designed to visualize the momentum and velocity of price movements within a specific timeframe on a trading chart. Instead of looking at complex price patterns, it focuses on the "heartbeat" of the market by tracking how frequently the price moves in a specific direction during each new candle.
How the Logic Works
The tool operates by monitoring every individual price change (or "tick") that occurs as the market fluctuates. Here is the step-by-step breakdown of its logic:
- Directional Tracking: The script constantly compares the current price to the price immediately preceding it. It determines if the move was upward or downward.
- Momentum Counting:
- Every time the price moves up, a counter for "Buy" momentum is increased.
- Every time the price moves down, a counter for "Sell" momentum is increased.
- Visual Representation: These counters are then displayed on your chart as a histogram. A higher bar indicates a high frequency of movement in that direction, signaling stronger immediate pressure or "speed" in the market.
- Automatic Reset: The indicator is designed to refresh its data every time a new candle forms. This ensures that you are always looking at the momentum of the current price action rather than being influenced by historical data from previous periods.
Purpose for the Trader
By using this logic, a trader can quickly identify whether the market is moving with conviction or if it is struggling to gain direction. It filters out the noise of static prices and highlights the intensity of the buying and selling pressure, allowing for a clearer view of where the immediate "speed" of the market is heading.
//+------------------------------------------------------------------+
//| SpeedTick.mq4 |
//| Copyright © 2006, XEON |
//| xeon@nm.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, XEON"
#property link "xeon@nm.ru"
//Èíäèêàòîð íàðîñòàíèÿ äâèæåíèÿ öåí çà ïðîìåæóòîê âðåìåíè
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red
//---- indicator buffers
double BUYBuffer[];
double SELLBuffer[];
//------------------------------
int NewBar;
double OldBid, NewBid;
int BUYTick, SELLTick;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
SetIndexStyle(0,DRAW_HISTOGRAM,0);
SetIndexBuffer(0,BUYBuffer);
SetIndexStyle(1,DRAW_HISTOGRAM,0);
SetIndexBuffer(1,SELLBuffer);
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
OldBid = NewBid;
NewBid = Bid;
if(NewBid>OldBid){BUYTick++;}
else if(NewBid<OldBid){SELLTick++;}
else {BUYBuffer[0]=0; SELLBuffer[0]=0;}
BUYBuffer[0] =BUYTick;
SELLBuffer[0]=-SELLTick;
if(NewBar!=Bars){
NewBar=Bars;
BUYTick = 0;
SELLTick = 0;
}
//----
return(0);
}
Comments