NEWMARGIN |
Top Previous Next |
Keyword Description Required margin Class Function Where Legal
Syntax NEWMARGIN
Return Value Returns the dollar amount of required margin for the trade being presented. This value is user specified in Symbol Manager. Example Sample code IF NEWMARGIN + TOTALMARGIN > TOTALEQUITY * .85 THEN_ NEWCONTRACTS = 0 ELSE... ' This fragment tells Mechanica not to accept a new trade if ' doing so would put margin requirements over 85% of equity.
MEMORY[1] = (TOTALEQUITY * .50 - TOTALMARGIN ) / NEWMARGIN ' This tells Mechanica to save in MEMORY[1] the number of ' contracts or lots to trade if you wished to never margin ' more than 50% of your equity. IF NEWMARGIN > SECTORMARGIN * .2 THEN NEWCONTRACTS = ...
See also: |