Moderator: admin
function checkAccountRow()
if mAccountRow == nil then
mAccountRow = core.host:findTable("accounts"):find("AccountID", mAccount);
else
mAccountRow:refresh();
end
end
function getUsableMargin()
checkAccountRow();
return mAccountRow.UsableMargin;
end
function getUsableMarginPercent()
checkAccountRow();
return (mAccountRow.UsableMargin / mAccountRow.Equity) * 100;
end
Return to Indicator Development
Users browsing this forum: No registered users and 21 guests