Portfolio_CurrentEntries
Posted: Feb 24 2011
Hi, in MC Portfolio Backtester I applied this code to a portfolio of symbol.
I woul have only one symbol in portfolio and then I used the function Portfolio_CurrentEntries.
The problem is when the signal go in position at the same day on different symbol, infact I have all the symbol (of the day when was generated the signal) in portfolio.
I did anything wrong or is a limit of Portfolio_CurrentEntries who haven' t the value on the same bar?
Many thanks
Riccardo
input: BandLen(20);
VALUE1=XAverage(C,BANDLEN);
VALUE2=Portfolio_CurrentEntries;
IF C cross above VALUE1 AND VALUE2<1 THEN
buy ("f") next bar at o;
IF C< VALUE1 THEN begin
sell next bar at o;
I woul have only one symbol in portfolio and then I used the function Portfolio_CurrentEntries.
The problem is when the signal go in position at the same day on different symbol, infact I have all the symbol (of the day when was generated the signal) in portfolio.
I did anything wrong or is a limit of Portfolio_CurrentEntries who haven' t the value on the same bar?
Many thanks
Riccardo
input: BandLen(20);
VALUE1=XAverage(C,BANDLEN);
VALUE2=Portfolio_CurrentEntries;
IF C cross above VALUE1 AND VALUE2<1 THEN
buy ("f") next bar at o;
IF C< VALUE1 THEN begin
sell next bar at o;