StartEquity =
100000;
SetOption("InitialEquity", 100000);
SetOption("MinShares",100);
Max_Pos =
30;
SetOption("MaxOpenPositions",Max_Pos);
RoundLotSize = 10;
PointValue = 1;
//
//Compute
Positions and position size
Port_Equity = Equity(0,0);
//
<<<< ==== This works OK
Port_Equity = Foreign("~~~EQUITY()","C");
//
<<<< ==== This does not work
Positions_ = Port_Equity / 10000;
Positions = IIf(Positions_
> Max_pos,Max_pos,Positions_);
SetPositionSize(Port_Equity/Positions,spsValue);
Thanks
Ara