Hi
I am unable to understand the logic behind the exploration process, so I can not follow my own system.
I have a system that buy up to 10 stocks, and sometimes sells one or two, sometimes all.
I use
SetTradeDelays(1,1,0,0);
So the buying day is one day after the buy signal.
So, I understand that i have to explore i.e. 29 jan, and the backtesting should be 30 jan.
And I use
PositionScore=10-Ref(MACD(12,26),-1)
I understand that positionscore affects backtesting, not exploration.
But If I order the exploration results, the stocks should be the same as backtest bought stocks.
All this works fine if I have not portfolio.
i.e. in 31 jan, and the exploration was:
These are 6 stocks, ordered by the same formula as Positionscore
The backtest one day later, 3 feb , supposed there were no stocks in the portfolio, is:
So, everything is perfect: the stocks bought are the 6 first stocks of the exploration the previous day.
(trying other dates, if there are more than 10 stocks, the first ten ordered by the positionscore rank are chosen)
But, if I backtest from several months before to 30 jan, the portfolio is full bought, and should only buy a new stocks if there is a previous selling
Well, in 31 jan there is a sell signal: will be sold LPG, obviously next day 3Feb.
Then, in 3 feb should be bought one stock.
Wich one? Supposed to be the first stock in the 31 jan exploration, wich was TFSL.
But there is no buying on 3 feb. The portolio remain only with 9 stocks.
And the next day, 4 Feb, at last is bought one stock.
But is not bought the first of the 3Feb exploration, but the last one: RVNC
I can not understand this logic
Any help will be really appreciated