GetRTAccountEquity
Posted: Apr 04 2014
Hello all,
this code:
assume that equity = 0. Why this?
Thank all for any answer or suggestion
No Erocla
this code:
Code: Select all
vars: lot(0),STOPLOSS(0),TAKEPROFIT(0),up(0),dw(0),equity(0);
input: period(20),dev(2);
equity = GetRTAccountEquity(GetAccountID);
if LastBarOnChart then begin
Value1 = Text_New_s(Date, Time_s, High + 6 * MinMove/PriceScale, NumToStr(equity , 0));
Text_SetColor(Value1, Yellow);
end;
lot = 100000;
up = BollingerBand(h,period,dev);
dw = BollingerBand(l,period,-dev);
if ( c > up ) then
BUY ( "LONG") lot SHARE NEXT BAR AT open;
if ( c < dw ) then
SELLSHORT ("SHORT") lot SHARE NEXT BAR AT OPEN;
SetStopLoss(200);
SetProfitTarget(200);
Thank all for any answer or suggestion
No Erocla