Set_Fibo_Price_Default

Download script
Author: Copyright Waddah Attar
Set_Fibo_Price_Default

This script is designed to automate and standardize the appearance of Fibonacci retracement levels on your trading charts. For traders who frequently use Fibonacci tools, maintaining consistent formatting can be tedious; this tool eliminates that manual work by automatically organizing how these levels are displayed.

How It Works

The script performs a continuous scan of your active trading chart to identify any Fibonacci objects you have placed. Once it detects these tools, it applies a specific set of pre-defined labels to the key price points.

Specifically, it targets the following standard Fibonacci percentages:

  • 0.0 and 100
  • 23.6
  • 38.2
  • 50
  • 61.8
  • 161.8
  • 261.8
  • 423.6

Key Functionalities

  • Automated Labeling: Instead of you having to manually type in the percentage values for each level, the script automatically updates the description of these levels to include the percentage in parentheses followed by the actual price (e.g., (61.8) - $XXXX).
  • Dynamic Updates: The script is designed to refresh these labels constantly. This ensures that as the market moves and your Fibonacci tool stretches or shifts, the labels remain accurate and visible.
  • Universal Application: It doesn't just apply to one specific tool; it scans all Fibonacci objects currently active on your chart, ensuring a uniform look across your entire technical analysis setup.

By using this script, you ensure that your charts remain clean, professional, and consistently formatted, allowing you to focus on the market movement rather than manual data entry.

9 Views
0 Downloads
0 Favorites
Set_Fibo_Price_Default
//+------------------------------------------------------------------+
//|                                       Set_Fibo_Price_Default.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()
  {
   Comment("Set_Fibo_Default");
   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");
         }
     }
   Comment("");
   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