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

Re: Changing inputs across symbols in same workspace



PureBytes Links

Trading Reference Links

Mel,

I created the following code to automatically calculate a position size that
i wanted. I used the variable pstnsize. It is defined as a variable with an
initial amount. If you go in to Easylanguage and change the value of the
variable, it will update your strategy and make the changes in all of your
systems that use it(When you verify it). I think that does what you want. In
my case I want a round number of shares and have created an algorithm to do
it. I use a slightly different formula if the share price is above 50.
Create your own algorithm, but the process is the same.

If C > 0 AND C < 50 then begin
 nmbrsharesraw = pstnsize/C;
    nmbrshares = Intportion(nmbrsharesraw * .01) * 100;
end Else begin
If C > 50 Then
    nmbrsharesraw = pstnsize/C;
    If FracPortion(nmbrsharesraw * .01) > .50 then
   nmbrshares = (Intportion(nmbrsharesraw * .01) + 1) * 100;
End;

In my trade statement I just say:

Buy (system) nmbrshares Shares this Bar on Close;

Jim Bronke
Phoenix, AZ



----- Original Message -----
From: "Mel" <melsmail=omega_list@xxxxxxxxxxx>
To: "Omega List" <omega-list@xxxxxxxxxx>
Sent: Wednesday, November 28, 2001 1:12 AM
Subject: Changing inputs across symbols in same workspace


: I am setting up multiple symbols in one  workspace and all have the same
: strategy and the same inputs.
:
: One of the inputs is the account size to determine number of contracts to
: trade.
:
: Is it possible to globally change this as the account size varies ( it is
: not varied inside the code by the addition of netprofit ) as I want to
take
: the real amount and have the code use this value. I do not mind doing it
: once manually but it would be a
: real pain across say 30 - 40 symbols.
:
: I have tried resetting the strategy inputs in the system builder, with the
: status turned off  and also amending the account size in the code and then
: verifying - but neither worked.
:
: Thanks
:
: Mel
:
: