Running a screener on a specific date

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #239639 quote
    plbourse
    Participant
    New

    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

    #239756 quote
    Iván González
    Moderator
    Master

    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")
    plbourse thanked this post
    #239863 quote
    plbourse
    Participant
    New

    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

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Running a screener on a specific date


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
plbourse @bousepl Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by plbourse
1 year, 4 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 10/28/2024
Status: Active
Attachments: No files
Logo Logo
Loading...