help ,,,, my trading manual system

 

please, help me ... i created a manual system indicator to see my balance , equtiy and margin but dosnt work in my MT4.

dosnt appear any information .

what is wrong in my code?



#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function  
//        Ballance & Equity                      |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 Green
double balance[], equity[], margin[];
 
int init()
{
    IndicatorShortName( "vGrafBalance&Equity&Margin" );
    IndicatorDigits( 3 );
 
    SetIndexStyle( 0, DRAW_LINE );
    SetIndexBuffer( 0, balance );
    SetIndexLabel( 0, "Balance" );
 
    SetIndexStyle( 1, DRAW_LINE );
    SetIndexBuffer( 1, equity );
    SetIndexLabel( 1, "Equity" );
   
    SetIndexStyle( 2, DRAW_LINE );
    SetIndexBuffer( 2, margin );
    SetIndexLabel( 2, "Margin" );
    return(INIT_SUCCEEDED);
}
int start()
{
    balance[0] = GlobalVariableGet( "vGrafBalance" );
    equity [0] = GlobalVariableGet( "vGrafEquity"  );
    margin [0] = GlobalVariableGet( "vGrafMargin"  );
    return(INIT_SUCCEEDED);
}

 

  1. Play video Please edit your post.
    For large amounts of code, attach it.

  2. You are drawing lines, which only appear between one candle and the next. If you wait for a new candle, you should see your lines.
  3. Alternatively see if the buffer at one is EMPTY_VALUE, and copy it there also.