The 10 Minute Trader is a custom technical analysis tool designed to provide visual signals on a trading chart by monitoring the relationship between various momentum and trend indicators. Instead of requiring the user to manually interpret complex lines, this script automates the detection of specific "crosses" or shifts in market sentiment to highlight potential entry points.
Core Analytical Logic
The tool functions by simultaneously calculating five different types of market data:
- Moving Averages: It tracks both a Linear Weighted Moving Average (LWMA) and a Simple Moving Average (SMA). These are used to smooth out price fluctuations and identify the prevailing trend.
- Momentum Oscillators: The script monitors the Stochastic Oscillator and the Relative Strength Index (RSI), which help determine whether a market move is becoming overextended or gaining strength.
- Trend Convergence: It calculates the Moving Average Convergence Divergence (MACD) to measure the distance and speed between different moving averages.
Signal Generation
The primary logic of this script focuses on the interaction between the Linear Weighted Moving Average and the Simple Moving Average. The tool specifically looks for "crossover" events—moments where these two averages intersect:
- Bullish/Bearish Transitions: When the short-term moving average (LWMA) crosses above or below the longer-term moving average (SMA), it indicates a potential shift in momentum.
- Visual Feedback: Whenever one of these crossovers occurs, the script automatically places a visual marker (an open square) on the chart at that specific price point.
Practical Application
By filtering the constant noise of price action into distinct visual markers, this tool helps traders identify pivot points where the trend may be changing direction. It serves as an automated "alert" system that highlights moments where the short-term price velocity is diverging from the longer-term average, allowing for faster decision-making during active trading sessions.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| 10 Minute trader |
//+------------------------------------------------------------------+
#property copyright "Ron T"
#property link "http://www.lightpatch.com"
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 White
#property indicator_color2 Red
#property indicator_color3 Blue
#property indicator_color4 Green
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
// User Input
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//|------------------------------------------------------------------|
int init()
{
// 233 up arrow
// 234 down arrow
// 159 open square
SetIndexStyle(0,DRAW_ARROW);
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexArrow(0,159);
SetIndexStyle(1,DRAW_ARROW);
SetIndexBuffer(1, ExtMapBuffer2);
SetIndexArrow(1,159);
SetIndexStyle(2,DRAW_ARROW);
SetIndexBuffer(2, ExtMapBuffer3);
SetIndexArrow(2,159);
SetIndexStyle(3,DRAW_ARROW);
SetIndexBuffer(3, ExtMapBuffer4);
SetIndexArrow(3,159);
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
int i;
for( i=0; i<Bars; i++ ) ExtMapBuffer1[i]=0;
for( i=0; i<Bars; i++ ) ExtMapBuffer2[i]=0;
for( i=0; i<Bars; i++ ) ExtMapBuffer3[i]=0;
for( i=0; i<Bars; i++ ) ExtMapBuffer4[i]=0;
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
double wma=0, wma_p=0; // linear Weighted Moving Average (and _Previous)
double sma=0, sma_p=0; // Simple Moving Average (and _Previous)
double stochm=0; // STOCHastic Main
double stochs=0; // STOCHastic Signal
double macdm=0; // Moving Average Convergance Divergance Main
double macds=0; // Moving Average Convergance Divergance Signal
double rsi=0; // Relative Strength Indicator
int pos=Bars-100; // leave room for moving average periods
while(pos>=0)
{
wma_p=wma; // save previous calculations
wma=iMA(Symbol(),0,10,0,MODE_LWMA,PRICE_CLOSE,pos);
sma_p=sma; // save previous calculations
sma=iMA(Symbol(),0,20,0,MODE_SMA,PRICE_CLOSE,pos);
// Cannot plot these since they are 0-100
// and chart is likely autoranging to 1.2000
stochm=iStochastic(Symbol(),0,10,6,6,0,1,0,pos);
stochs=iStochastic(Symbol(),0,10,6,6,0,1,1,pos);
rsi=iRSI(Symbol(),0,28,PRICE_CLOSE,pos);
macdm=iMACD(Symbol(),0,24,52,18,0,0,pos);
macds=iMACD(Symbol(),0,24,52,18,0,1,pos);
if ( wma_p < sma_p && wma > sma )
{
ExtMapBuffer1[pos]=wma;
}
if ( wma_p > sma_p && wma < sma )
{
ExtMapBuffer1[pos]=wma;
}
pos--;
}
return(0);
}
//+------------------------------------------------------------------+
Comments