Price above Tenkansen for N periods

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #101337 quote
    prevailution
    Participant
    Junior

    Hi,

    I want a code that screens for the price closing above the Ichimoku Tenkansen for a number of periods

    For example: Lets say price closing above Tenkansen for last 10 periods

    Tenkansen = (highest[9]+lowest[9])/2

    close > Tenkansen for the last 10 periods

    How would I write this?

    Thanks

    #101371 quote
    Nicolas
    Keymaster
    Legend

    You can use a summation of the last 10 periods tested condition:

    Tenkansen = (highest[9]+lowest[9])/2
    
    test = summation[10](close>tenkansen)=10
    
    screener[test]

    If the sum of the true conditions is 10, then the ‘test’ variable is also true.

    prevailution thanked this post
    #101391 quote
    prevailution
    Participant
    Junior

    That’s perfect thank you Nicolas

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Price above Tenkansen for N periods


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by prevailution
7 years, 2 months ago.

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