Author: Copyright � 2005, Jason Robinson (jnrtrading).
comments1

This script is designed to function as a specialized visual tool within the MetaTrader trading platform. Its primary purpose is to manage and display information related to the "Supertrend" analysis on your charts.

Core Functionality

The logic of this script focuses on environmental setup and visual identification rather than complex mathematical calculations. It serves as a framework that prepares the workspace for specific trading signals. Key aspects include:

  • Visual Labeling: The script is designed to identify a specific window or area on your chart. When active, it automatically generates a text label to help the user quickly identify which currency pair (such as GBPUSD) the current data corresponds to.
  • Dynamic Positioning: It ensures that the visual information is placed in a consistent, readable location (the top-left corner of the indicator window), making it easy for a trader to glance at the screen and understand the context of the data.
  • System Identification: The script includes a check to see if it belongs to a specific "Magic Number." This acts like a digital ID badge; it ensures that the visual elements only appear when the script is linked to the correct trading system, preventing clutter from unrelated tools.

User Experience

For the end user, this script acts as an organizational layer. Instead of leaving you to guess which data belongs to which currency pair, it provides a clear, professional heading on your display. It streamlines the viewing experience by confirming that the "Supertrend" analysis you are looking at is correctly synchronized with your intended trading pair.

13 Views
0 Downloads
0 Favorites
comments1
//+------------------------------------------------------------------+
//|                                                   Supertrend.mq4 |
//|                   Copyright © 2005, Jason Robinson (jnrtrading). |
//|                                      http://www.jnrtrading.co.uk |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, Jason Robinson (jnrtrading)."
#property link      "http://www.jnrtrading.co.uk"

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 DeepSkyBlue
#property indicator_color2 Yellow  //Red



extern string Pair1 = "GBPUSDm";



//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {

      

//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int limit, i, cciPeriod;
   double cciTrendNow14, cciTrendPrevious14, cciTrendNow, cciTrendPrevious;



       //Signal Labels           

if (OrderMagicNumber() == 00006)
    {ObjectCreate("SST1", OBJ_LABEL, WindowFind("SUPER_TREND 2-MPTF"), 0, 0);
        ObjectSetText("SST1",Pair1,14, "Arial Bold", White);
        ObjectSet("SST1", OBJPROP_CORNER, 0);
        ObjectSet("SST1", OBJPROP_XDISTANCE, 10);
        ObjectSet("SST1", OBJPROP_YDISTANCE, 14);} 
         
//---- 
   
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments