Breakout10 & MACD (indicator / screener)

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #29137 quote
    Doctrading
    Participant
    Master

    Hello fellow traders,

    I’m finally freeing up some free time to respond to your emails, and encode the indicators / strategies you asked for !

    This request goes back for more than a month, as it is simple, I start with it.

    Here is the e-mail:

    Good Morning Marc,

    For first, very compliments for all your studies, and all your video. I use prorealtime with CFD. I’m new-trader and i will need a little help for code one strategie that i’ave see.

    I would ask you kindly if you could give me a hand to encode the screener.

    that are the Condition:

    1) a= MACD crosses over 0

    2)When “a” is true, (since a> 0), verify that within next 6 bars, the close is > than the maximum close of the last 10 bars

    So i will Screnner all the share o currenies that have the close > Highest[10](close), within 6 bars since MACD>0

    I tried to encode the screener, but i have a problem to encode the time condition “within 6 bar..”

    Thnak you in advance for your time, and i Hope you could help me….

    First, I would like to say that if you write:

    Close > highest [10] (close)

    => You will have no result.

    Indeed, even if the current closure is larger than that of the previous 10 candles, it is not greater than the current candle, itself!

    It is therefore necessary to put:

    Close > highest [10] (close[1])

    which refers to the previous 10 candles.

    This being said, here is the result, both for the positive and negative MACDs.

    Indic = 0
    
    iMACD = MACD[12,26,9](close)
    
    // HAUSSE
    ca1 = close > Highest[10](close[1])
    ca2 = iMACD crosses over 0 or iMACD[1] crosses over 0 or iMACD[2] crosses over 0 or iMACD[3] crosses over 0 or iMACD[4] crosses over 0 or iMACD[5] crosses over 0
    
    IF ca1 and ca2 THEN
    Indic = 1
    ENDIF
    
    // BAISSE
    cv1 = close < Lowest[10](close[1])
    cv2 = iMACD crosses under 0 or iMACD[1] crosses under 0 or iMACD[2] crosses under 0 or iMACD[3] crosses under 0 or iMACD[4] crosses under 0 or iMACD[5] crosses under 0
    
    IF cv1 and cv2 THEN
    Indic = -1
    ENDIF
    
    return Indic
    
    // To get the screener, just replace the last line by : 
    // screener[Indic]
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Breakout10 & MACD (indicator / screener)


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Doctrading @doctrading Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/20/2017
Status: Active
Attachments: No files
Logo Logo
Loading...