Select a specific candle with a screener

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #119883 quote
    Marcel van Vliet
    Participant
    Veteran

    Hello,

    In order to optimize one of my stock screeners, I’m looking for a possibility to select a single candle.

    For example the first candle of the month , or the candle between 08:00 and 09:00 and integrate this into my screener.

    The following condition to select on price levels is already successfully integrated:

    PriceCond = 0
    IF close >= 10 AND close <= 25 THEN
       PriceCond = 1
    ENDIF
    

    Is it possible to create a coding rule for this? I came up with the one below, but that does not work at all………………..

    Time= 0
    IF time >=080000 AND time<=090000 THEN
    Time= 1
    ENDIF
    

    Thank you

    #119894 quote
    robertogozzi
    Moderator
    Master

    You cannot use TIME as a variable, since it’s a system constant that cannot be altered.

    Use MyTime, instead.

    Your idea is fine, it will do.

    Selecting the first candle of the month can be done, provided there are no more than 253 candles from then on, si it would be impossible on a TF lower than 4 hours. You’ll need to scan backwards till you find the month’s first day.

    Marcel van Vliet thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Select a specific candle with a screener


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
6 years, 1 month ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 02/18/2020
Status: Active
Attachments: No files
Logo Logo
Loading...