Set_Fibo_Price

Author: Copyright Waddah Attar
Set_Fibo_Price

This tool is designed to enhance the visual clarity and professionalism of your trading charts by automatically managing how Fibonacci retracement levels are displayed.

For many traders, one of the most time-consuming aspects of technical analysis is manually updating the price labels on every Fibonacci tool. This script automates that process, ensuring that your chart remains clean and easy to read at a glance.

How it Works

The logic follows a straightforward "scan and update" process:

  • Automatic Detection: The script constantly monitors your trading chart to identify any active Fibonacci retracement objects you have drawn.
  • Dynamic Labeling: Instead of leaving the default technical percentages as they appear on the screen, the script automatically reformats these labels. It injects a specific text structure that includes the percentage level followed by the actual market price.
  • Real-Time Consistency: By continuously scanning the chart, the tool ensures that if you move, resize, or modify your Fibonacci levels, the accompanying price descriptions remain accurate and synchronized with the current market data.

Key Benefits for Traders

  • Eliminate Manual Entry: You no longer need to manually type in prices or re-format labels every time you adjust your analysis; the script handles the formatting instantly.
  • Improved Readability: By displaying both the Fibonacci percentage (e.g., 61.8) and the corresponding price point simultaneously, you can make faster execution decisions without having to hover your mouse over specific points on the chart.
  • Clean Workspace: It provides a uniform look across all your trading charts, ensuring that every Fibonacci tool follows the exact same naming and pricing convention automatically.
11 Views
0 Downloads
0 Favorites
Set_Fibo_Price
//+------------------------------------------------------------------+
//|                                               Set_Fibo_Price.mq4 |
//|                              Copyright © 2006, Eng. Waddah Attar |
//|                                          waddahattar@hotmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright Waddah Attar"
#property link      "waddahattar@hotmail.com"
//----
#property indicator_chart_window
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int init()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int deinit()
  {
   int    obj_total = ObjectsTotal();
   string name;
   for(int i = 0; i < obj_total; i++)
     {
       name = ObjectName(i);
       if(ObjectType(name) == OBJ_FIBO)
         {
           ObjectSetFiboDescription(name,0, "0.0");
           ObjectSetFiboDescription(name,1, "23.6");
           ObjectSetFiboDescription(name,2, "38.2");
           ObjectSetFiboDescription(name,3, "50");
           ObjectSetFiboDescription(name,4, "61.8");
           ObjectSetFiboDescription(name,5, "100");
           ObjectSetFiboDescription(name,6, "161.8");
           ObjectSetFiboDescription(name,7, "261.8");
           ObjectSetFiboDescription(name,8, "423.6");
         }
     }
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   int    obj_total = ObjectsTotal();
   string name;
   for(int i = 0; i < obj_total; i++)
     {
       name = ObjectName(i);
       if(ObjectType(name) == OBJ_FIBO)
         {
           ObjectSetFiboDescription(name, 0, "(0.0) - %$");
           ObjectSetFiboDescription(name, 1, "(23.6) - %$");
           ObjectSetFiboDescription(name, 2, "(38.2) - %$");
           ObjectSetFiboDescription(name, 3, "(50) - %$");
           ObjectSetFiboDescription(name, 4, "(61.8) - %$");
           ObjectSetFiboDescription(name, 5, "(100) - %$");
           ObjectSetFiboDescription(name, 6, "(161.8) - %$");
           ObjectSetFiboDescription(name, 7, "(261.8) - %$");
           ObjectSetFiboDescription(name, 8, "(423.6) - %$");
         }
     }
//----   
   return(0);
  }
//+------------------------------------------------------------------+


Comments