Dear all
I am posting here in the English forum, hoping that I will reach morfe members and hopefully find a solution.
I have developed a screener that is working fine. I would like to know if there is a possibility to run this screener on a specific market but on an historical date.
I need this for evaluation of a strategy on multiple stocks or indexes, where I want always to invest on the stocks that present the highest indicator value and therefore I replace the weaker stocks by new one. I have not found a way to do this automatically (PRT runs only on one stock at a time, I know other SW that could do it, but they are limited in the number of symbols that you work on).
To manually backtest my strategy,
- I would need to run the screener in the past every week for example
- chose the symbols that are elected for new investments
- close the position of weaker symbols
- manaully calculate the P&L of the system
Is my question clear and does anyone have any clue how to solve it
Enjoy trading and developing strategies, thanks for your answers
Hi, this is an example of screener.
ema10=average[10,1](close)
ema50=average[50,1](close)
if ema10 > ema50 then
count=count+1
else
count=0
endif
bars=barssince(date=20240926)
SCREENER[count[max(0,bars-1)]=10 and bars>0](bars as "bars")
Thanks Ivan
I will reread the documentation and try to implement it.
If I get difficulties, I will come back to you
Have a great day