Factals beyond periods set

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #147072 quote
    Monochrome
    Participant
    Senior

    I am trying to use this code but it only seems to register the factals in the CP periods. e.g If a buy signal is formed, it seems to only look at the high factals within the 20(cp) periods. If there is no high factal within that period it dosent look at the last ‘high’ factal.

    I hope I am making sense.

    cp = 20
    if high[cp] >= highest[2*cp+1](close) then
    LH = 1
    else
    LH = 0
    endif
     
    if low[cp] <= lowest[2*cp+1](close)  then
    LL = -1
    else
    LL = 0
    endif
     
    if LH = 1 then
    TOPy = high[cp]
    TOPx = barindex[cp]
    endif
     
    if LL = -1 then
    BOTy = low[cp]
    BOTx = barindex[cp]
    endif
     
    timeframe (default)
    //////////////////////
    C1 = (close CROSSES OVER TOPy)
    D1 = (close CROSSES UNDER BOTy)

    How do I make it so that close crosses over the last TOPy not just the last TOPy within the 20 periods?

    #147073 quote
    Monochrome
    Participant
    Senior

    I attached a screenshot for better understanding

    Screenshot-16.png Screenshot-16.png
    #147077 quote
    Monochrome
    Participant
    Senior

    My sincere apologises. I had just realised the chart is in heikin ashi! Otherwise it seems to be working as intended.

    #147108 quote
    Nicolas
    Keymaster
    Master

    other fractals breakout strategies: (many other examples could also  be found over the forums)

    Fractal breakout intraday Strategy EUR/USD 1H

    Trend Breakout

    stratégie de trading basée sur le fractal de Bill Williams

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

Factals beyond periods set


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Monochrome @monochrome Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/11/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...