Set most recent fractal low or swing low as stop loss?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #89565 quote
    SakisTraderSakisTrader
    Participant
    New

    Hi all,

    Anyone know how to call out the low of a candle which formed at the most recent fractal low so I can use it in a system to place a stop loss at that level once my buy conditions have been met?

    Many thanks in advance for any input.

    #89626 quote
    VonasiVonasi
    Moderator
    Master

    The code found in this indicator might help you:

    Pivot Support/Resistance Zones

    Adapted like this it should return value SupportPrice that can be used as your SL level:

    PivotBAR     = 2                      //2  bars AFTER  pivot
    LookBack     = 2                      //2  bars BEFORE pivot
     
    BarLookBack  = PivotBAR + 1
    IF low[PivotBAR] < lowest[LookBack](low)[BarLookBack] THEN
     IF low[PivotBAR] = lowest[BarLookBack](low) THEN
       SupportPrice  = low[PivotBAR]
     ENDIF
    ENDIF
    

     

    Change the PivotBar and LookBack setting depending on how you exactly define a new fractal.

    Not tested.

Viewing 2 posts - 1 through 2 (of 2 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

Set most recent fractal low or swing low as stop loss?


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by VonasiVonasi
7 years, 8 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/24/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...