iBalance
Download scriptThis tool is designed to function as a visual tracking element within the MetaTrader trading platform. It creates a dedicated sub-window on your charts specifically for monitoring account balance data.
Core Functionality
The primary purpose of this script is to provide a consistent visual representation of a financial figure over time. By isolating this information into its own window, it allows traders to view balance trends independently of the price action occurring on the main trading chart.
How it Works
- Visual Display: The indicator generates a continuous line plotted in a specific blue color. This makes it easy to identify at a glance how a value is moving across different timeframes.
- Data Mapping: The logic scans through the historical data of the current chart (from the oldest available bar to the most recent). For every point in time recorded on your history, the script assigns a specific numerical value to that point.
- Customizable Baseline: In its current configuration, the tool is set to display a steady, fixed value across the entire timeline. This serves as a foundational baseline for users who want to see a flat reference line or a steady starting point in their visual analysis.
- User Interface: The script is configured to show exactly two decimal places, ensuring that the information displayed remains clean and readable, similar to how currency is typically formatted.
Summary for Traders
Essentially, this tool acts as a "dashboard" element. It takes a specific numerical value and translates it into a visual line graph in a separate window, helping you keep your account's primary figures organized and visible while you navigate different market movements.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| Balance.mq4 |
//| Copyright © 2006, Renato P. dos Santos |
//| http://www.reniza.com/forex/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Renato P. dos Santos"
#property link "http://www.reniza.com/forex/"
#property indicator_separate_window
#property indicator_buffers 1
//---- Indicator line properties
#property indicator_color1 DodgerBlue
#property indicator_width1 2
#property indicator_minimum 0
//---- Name for DataWindow and indicator subwindow label
string short_name="Balance";
//---- Buffers
double BalanceBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexLabel(0,"Balance");
SetIndexBuffer(0,BalanceBuffer);
SetIndexStyle(0,DRAW_LINE);
IndicatorDigits(2);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit=Bars;
//----
int pos;
for(pos=limit;pos>=0;pos--) {
BalanceBuffer[pos]=50000;
// BalanceBuffer[pos]=AccountBalance();
}
//----
return(0);
}
//+------------------------------------------------------------------+
Comments