Author: Copyright (c) 2009,Kurl FX
MTFPI-sub1

This technical indicator is designed to assist traders by identifying specific entry signals and price levels on a trading chart. Rather than relying on a single type of data, the script functions as a "coordinator," gathering information from four other specialized sub-indicators to make a final decision on whether a trade opportunity exists.

How the Logic Works

The script operates by constantly monitoring the market and filtering data through three primary layers:

1. Trend Filtering The tool first looks at the overall market direction using moving averages. It checks for a "positive" or "negative" trend environment. This ensures that the script only suggests signals that align with the broader momentum of the market, helping to avoid trading against a strong opposing trend.

2. Momentum and Signal Detection Once the general trend is established, the script looks for specific momentum triggers. It identifies whether the price action is showing enough strength to enter a position. It does this by comparing multiple data points from specialized oscillators to ensure that the "push" in the market is consistent and not just a temporary fluctuation.

3. Precision Entry and Protection When both the trend and the momentum conditions are met, the script identifies two specific values:

  • The Signal: It marks a clear "Buy" or "Sell" direction.
  • The Price Level: It calculates a specific price point for the trade. This level acts as a reference for your entry or a potential cut-off point to manage risk.

Dynamic Adjustments

To ensure accuracy in real-world conditions, the logic includes a small adjustment for "spread" (the difference between the buying and selling price offered by a broker). If the current market price is slightly below the calculated signal level, the script automatically nudges the target price forward to account for this cost, ensuring that your entry levels remain realistic.

Summary of Visual Output

When the conditions are perfectly aligned, the indicator provides:

  • A clear signal indicating the direction to trade.
  • A specific price value used to guide your execution.
  • If the market is neutral or doesn't meet the strict criteria of all sub-indicators, the tool remains silent, helping you filter out "noise" and focus only on high-probability setups.
Miscellaneous
Implements a curve of type %1
9 Views
0 Downloads
0 Favorites
MTFPI-sub1
//KurlFX 2009.01.31
//+------------------------------------------------------------------+
//|	*** MTFPI-sub1 ***															|
//+------------------------------------------------------------------+
#property copyright "Copyright (c) 2009,Kurl FX"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color2 Blue

extern int FastEMA = 5;
extern int SlowEMA = 100;
extern int SignalSMA = 3;
extern int K_Period = 5;
extern int D_Period = 3;
extern int Slowing = 3;

double BS[];//Buy/no/Sell sign: -1;0;1
double GS[];//Go/Stop price: Entry or LossCutPoint
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
	SetIndexBuffer(0,BS);
	SetIndexBuffer(1,GS);
	SetIndexLabel(0,"sign");
	SetIndexLabel(1,"val");
	SetIndexStyle(0,DRAW_NONE);
	return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{
	return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{
	double spread=MarketInfo(Symbol(),MODE_SPREAD);
	int counted_bar=IndicatorCounted(); 
	int limit=Bars-counted_bar;
   for(int i=limit-1; i>=0; i--)
	{   
		double A=iCustom(NULL,0,"MTFPI-sub2",FastEMA,SlowEMA,SignalSMA,0,i);
		double Bb=iCustom(NULL,0,"MTFPI-sub3",K_Period,D_Period,Slowing,0,i);
		double Bs=iCustom(NULL,0,"MTFPI-sub3",K_Period,D_Period,Slowing,1,i);
		double C1=iCustom(NULL,0,"MTFPI-sub4",0,i);
		double C2=iCustom(NULL,0,"MTFPI-sub4",1,i);

		if (A>0 && Bb!=EMPTY_VALUE && C1>Bb && C2>Bb)
		{
			if(Close[i]<Bb)Bb=Bb+spread*Point;
			BS[i]=1.0;
			GS[i]=Bb;
		}
		else if (A<0 && Bs!=EMPTY_VALUE && C1<Bs && C2<Bs)
		{
			if(Close[i]<Bs)Bs=Bs+spread*Point;
			BS[i]=-1.0;
 			GS[i]=Bs;
      }
		else
		{
			BS[i]=0.0;
			GS[i]=EMPTY_VALUE;
		}
	}	  
	return(0);
}
//+------------------------------------------------------------------+

Comments