int Experts; // Amount of EAs
double Depo=10000.0, // Set deposit
Persent=30, // Set percentage
Money; // Desired money
string Quantity="GV_Quantity"; // GV name
//--------------------------------------------------------------------
//--------------------------------------------------------------------
int init() // Special funct. init()
{
Experts=GlobalVariableGet(Quantity); // Getting current value
Experts=Experts+1; // Amount of EAs
GlobalVariableSet(Quantity, Experts); // New value
Money=Depo*Persent/100/Experts; // Money for EAs
Alert("For EA in window ", Symbol()," allocated ",Money);
return; // Exit init()
}
//--------------------------------------------------------------------
//+------------------------------------------------------------------+
int start()
{
if(Martingale)CalculateMartingale();Balance=AccountBalance();
double MyPoint=Point;
if(Digits==3 || Digits==5) MyPoint=Point*10;
int New_Experts= GlobalVariableGet(Quantity);// New amount of EAs
if (Experts!=New_Experts) // If changed
{
Experts=New_Experts; // Now current
Money=Depo*Persent/100/Experts; // New money value
Alert("New value for EA ",Symbol(),": ",Money);
}
double TheStopLoss=0;
double TheTakeProfit=0;
if( TotalOrdersCount()==0 )