AccountEquity as an Indicator

 

Has anyone seen an indicator which displays your AccountEquity as a line in a separate window. I would imagine it could be attached to any chart as it would be independant of the chart symbol.

Because I am looking at hedge trading and have two open trades over a long period of time I would like to see how the equity changed to help validate correlation indicators.

The indicator doesnt necessarily have to look into the past, even if it just started tracking your equity from the minute it was attached and then I can build up a picture of what is actually working and what isnt.

I realise there is a strategy tester but I want the indicator on my chart so I can work with it.

Does anyone think this is possible?

 

Equity ind.

Files:
i_baleq.rar  2 kb
 

Improved version, equity+free margin+balance

Files:
 

Great indicator. I would love it if you could also put the values displayed as text.....

string P=Period();

ObjectCreate("TSR", OBJ_LABEL, WindowFind("Equity_scope"), 0, 0);

ObjectSetText("TSR",StringSubstr(Symbol(),0),12, "Arial Bold", CadetBlue);

ObjectSet("TSR", OBJPROP_CORNER, 0);

ObjectSet("TSR", OBJPROP_XDISTANCE, 25);

ObjectSet("TSR", OBJPROP_YDISTANCE, 2);

ObjectCreate("TSR1", OBJ_LABEL, WindowFind("Equity_scope"), 0, 0);

ObjectSetText("TSR1",StringSubstr(P,0),12, "Arial Bold", CadetBlue);

ObjectSet("TSR1", OBJPROP_CORNER, 0);

ObjectSet("TSR1", OBJPROP_XDISTANCE, 100);

ObjectSet("TSR1", OBJPROP_YDISTANCE, 2);
 

Actually, this may be a bit off topic but...

I have always wanted an indicater like this BUT has inputs for risk by percentage and pips..

Example.

Balance 5000

Risk 3%

stoploss 30

So my risk on this trade would be 150, my stoploss is 30, thats 5 a pip, translates to .5 lot

A variable would be needed for risk%

Display would list say 5 or 10 stoplosses so you would see....

Stoploss 5 = 30 a pip or 3 lots

Stoploss 10 = 15 a pip or 1.5 lots

Stoploss 20 = 7.5 a pip or .75 lots

Stoploss 30 = 5 a pip or .5 lots

Stoploss 50 = 3 a pip or .3 lots

Also a variable to indicate mini or standard account to change the pip and lot values one decimal place.

Nice huh

 

I trade EA's with this function for lot sizing.

MMRisk is % of balance at risk as user input parameter. The function needs SL in pips and returns lotsize.

double GetLotSize(int SL) // Calculates lotsize using Money Management

{

double Lot=0;

double MinLotSize=0;

double MaxLotSize=0;

double LotStep=0;

MinLotSize = MarketInfo(Symbol(),MODE_MINLOT);

MaxLotSize = MarketInfo(Symbol(),MODE_MAXLOT);

LotStep = MarketInfo(Symbol(),MODE_LOTSTEP);

Lot = NormalizeDouble(AccountBalance() * MMRisk * 0.01 / (SL * MarketInfo(Symbol(),MODE_TICKVALUE)),2);

Lot = NormalizeDouble(Lot/LotStep,0) * LotStep;

if(Lot < MinLotSize)

{

Lot = MinLotSize;

}

if(Lot > MaxLotSize)

{

Lot = MaxLotSize;

}

return(Lot);

}

Reason: