Time-dependent query: current candle is already at least 50% complete

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #113249 quote
    Fabian
    Participant
    Master

    Hello dear Community,

    I would like to specify in my code that results are only displayed if the current candle is already at least 50% complete.
    Can anyone help me?

    Thanks!

     

    #113257 quote
    robertogozzi
    Moderator
    Master

    If you mean 50% size… nobody knows what 100% will be.

    If you mean 50% time (say after 15 minutes on a 30-minute TF), you can try using TIME, but I never tried and cannot test it now.

    #113289 quote
    robertogozzi
    Moderator
    Master

    TIME does not work. I wrote this code to be applied to a 5-minute chart (to check a 10-minute chart), but it doesn’t return any result:

    TIMEFRAME(10 minute)
    myRSI  = RSI[14](close)
    Flag   = myRSI > 0
    TIMEFRAME(5 minute)
    MyTime = ((OpenMinute mod 5) = 0) AND ((OpenMinute mod 10) <> 0)
    TIMEFRAME(default)
    SCREENER[Flag > 0 AND MyTime = 1] (OpenMinute AS "Time")
    #113312 quote
    Fabian
    Participant
    Master

    Hi, Roberto,

    Thank you for your answer.

    Yes that was related to the >50% time.
    I didn’t manage it either, maybe Nicolas can help us?

    #113407 quote
    Nicolas
    Keymaster
    Master

    I’m testing this code:

    once NbBar = 1
    MyDay=day
    dayminutes = 1440*(MyDay-MyDay[1])
    MyHour=hour
    hourminutes = 60*(MyHour-MyHour[1])
    MyMin=minute
    barminutes = MyMin - MyMin[1] + hourminutes + dayminutes
    barminutes=abs(barminutes)
    Mybarminutes = lowest[NbBar](barminutes)[1]
    
    q = minute/mybarminutes
    
    test = round(q)-q<.5 and round(q)-q>0
    
    screener[test](minute/mybarminutes)
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Time-dependent query: current candle is already at least 50% complete


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Fabian @heikinashi Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by Nicolas
6 years, 3 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 11/20/2019
Status: Active
Attachments: No files
Logo Logo
Loading...