[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EL Code



PureBytes Links

Trading Reference Links

: Can anyone provide EL code for increasing or decreasing the number of
: contracts traded by each signal according to amount of total account
equity?
: For instance, buy 1 additional contract for each additional $25,000 of
: equity.  Thanks in advance.
: Regards,  Jack.

{InEq is an input for Initial Equity in the Account; PerCntr is an input for
the  Dollar amount traded per contract - i.e., for every $25K youhave, you'd
trade 1 contract; MxCntr is an input for the Maximum number of contracts to
trade - for liquidity reasons,}

{Ncontr is the number of contracts to trade.}

Inputs: InEq(25),PerCntr(25),Mxcntr(100);
Vars: Temp(0),Ncontr(0);

Temp=Floor((Netprofit+InEq*10000)/(PerCntr*1000));
If temp>1 then begin
  If temp<Mxcntr then ncontr=temp else ncontr=Mxcntr;
  end;




  • References: