Stabilitit Indikatot BUY_SELL

Download script
Author: Raouf Riad
Stabilitit Indikatot BUY_SELL

This script is a specialized visual tool designed to help traders monitor market stability and trend direction across multiple timeframes simultaneously. Instead of forcing you to switch between different charts to see what is happening, it aggregates data into a single dedicated window on your platform.

Core Functionality

The indicator functions as a multi-timeframe dashboard. It tracks four specific time intervals—the 5-minute, 15-minute, 30-minute, and 60-minute (1-hour) charts—and displays their current "stability" status in one place.

How the Logic Works

The tool uses a mathematical calculation known as a Parabolic SAR (Stop and Reverse). In technical trading, this is used to identify the prevailing trend of price movement. The script applies this logic to all four timeframes at once:

  • Trend Identification: For every timeframe monitored, the script compares the current market price against the calculated Parabolic SAR value.
  • Visual Signaling:
    • Buy Signals: If the current price is trading above the calculation point, the script identifies this as an upward trend and displays a specific symbol in Lime (Green).
    • Sell Signals: If the current price is trading below the calculation point, it identifies a downward trend and displays a specific symbol in Red.

User Experience

When you load this indicator, it automatically generates a clean dashboard layout:

  1. Labels: It clearly labels each section so you know which timeframe you are looking at (e.g., M5, H1).
  2. Dynamic Icons: The symbols on the dashboard update in real-time based on price action. If a trend shifts from bullish to bearish on the 15-minute chart, the icon will change color and shape instantly.
  3. One-Window Overview: This allows for "confluence" trading—enabling you to see at a glance if the short-term trends (like the 5-minute) align with the longer-term trends (like the 1-hour).

Important Note

The script includes a built-in date check. It is designed to function specifically for data sets within a certain timeframe; if it detects a year beyond 2015, it will issue an alert rather than displaying the dashboard.

Price Data Components
Series array that contains close prices for each bar
Indicators Used
Parabolic Stop and Reverse system
Miscellaneous
It issuies visual alerts to the screen
12 Views
0 Downloads
0 Favorites
Stabilitit Indikatot BUY_SELL

#property copyright "Raouf Riad"
#property link      "r-riad@web.de"

#property indicator_separate_window
//---- input parameters   
double    par_step=0.07;
double    par_max=0.2;
extern color     buycolour=Lime;
extern color     sellcolour=Red;
  int     Buy                  = 221;
  int     Sell                 = 222;
  int     Wait                 = 76;
  int myspace;
  string shortname = "Marktstabilität Indikator BUY_SELL (c) Raouf Riad 2009-2010";
  string timeframes []={"M5","M15","M30","H1"};
  int times[]={5,15,30,60};
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
if (Year()>2015)
{
Alert("");
return(0);
}
IndicatorShortName(shortname);
   
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   if (Year()>2015)
{
Alert("");
return(0);
}

   int    counted_bars=IndicatorCounted();
   myspace=WindowFind(shortname);
//----------------------------------------------------------------------------------------------------------------------
//---- to do the drawings once only
//----------------------------------------------------------------------------------------------------------------------
static bool alreadydrawn= false;

if (alreadydrawn==false)
{
//------------------------------------------------------------------------------
// create position and pipDiff and swing
//------------------------------------------------------------------------------
ObjectCreate("Stabilität",OBJ_LABEL,myspace,0,0,0,0,0,0);
ObjectSet("Stabilität",OBJPROP_XDISTANCE,10);
ObjectSet("Stabilität",OBJPROP_YDISTANCE,25);
ObjectSetText("Stabilität","Stabilität",12,"Times New Roman",Black);

for (int x=0;x<4;x++)
{
ObjectCreate("timename"+x,OBJ_LABEL,myspace,0,0,0,0,0,0);
ObjectSet("timename"+x,OBJPROP_XDISTANCE,(x*80)+100);
ObjectSet("timename"+x,OBJPROP_YDISTANCE,14);
ObjectSetText("timename"+x,timeframes[x],7,"Times New Roman",Blue);


}

//-------------------------------------------------------------------------------------------------------
// activate the position symbols 
//-------------------------------------------------------------------------------------------------------
for ( x=0;x<4;x++)
{
ObjectCreate("trend"+x,OBJ_LABEL,myspace,0,0,0,0,0,0);
ObjectSet("trend"+x,OBJPROP_XDISTANCE,(x*80)+100);
ObjectSet("trend"+x,OBJPROP_YDISTANCE,30);
ObjectSetText("trend"+x,CharToStr(Wait),10,"Wingdings",Yellow);
}// end of position symbols

//---------------------------------------------------------------------------------------------------
// create the pipdiff symbols
//--------------------------------------------------------------------------------------------------
for ( x=0;x<4;x++)
{

}
alreadydrawn=true;
}// end of the once only code

//----------------------------------------------------------------------------------------------------------
// calculate the sar values and assign appropriately
//----------------------------------------------------------------------------------------------------------
for (x=0;x<4;x++)
{
double sar = iSAR(Symbol(),times[x],par_step,par_max,0);
double sweetsar = NormalizeDouble(sar,2);
double price = NormalizeDouble(iClose(Symbol(),times[x],0),2);


if (sar>iClose(Symbol(),times[x],0))
{
ObjectSetText("trend"+x,CharToStr(Sell),12,"Wingdings",sellcolour);
//ObjectSetText("diffsignals"+x,DoubleToStr(sar-iClose(Symbol(),times[x],0),Digits),10,"Times New Roman",sellcolour);
//ObjectSetText("diffsignals"+x,"" + sweetsar - price,10,"Times New Roman",sellcolour);
}//end of sar up code
else 
if (sar<iClose(Symbol(),times[x],0))
{
ObjectSetText("trend"+x,CharToStr(Buy),12,"Wingdings",buycolour);
//ObjectSetText("diffsignals"+x,DoubleToStr(iClose(Symbol(),times[x],0)-sar,Digits),10,"Times New Roman",buycolour);

}// end of sar down code

//ObjectSetText("swingn"+x,DoubleToStr(iHigh(Symbol(),times[x],0)-iLow(Symbol(),times[x],0),Digits),10,"Times New Roman",Yellow);

}// end of sar values
   //Alert("sar= "+ sar, "close" +iClose(Symbol(),times[x],0));
   return(0);
   
  }
//+------------------------------------------------------------------+

Comments