Help translate a Fractal indicator into a Probacktest automatic trading

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

    Hello,

    I’m wondering if someone would be nice enough help me translate an indicator into a Probacktest.
    Indicator is based on Bill Williams fractals and places markers on the graph. I’d like to open positions on these markers :

    signal = 0
    
    // Fractals N candles
    Ncandles = 5
    
    // N Candles each side extreme candle
    Nside = (Ncandles - 1) / 2
    
    // Sup fractal definition
    IF high[Nside] >= highest[Ncandles](high) THEN
    Fup = high[Nside]
    signal = -1
    ENDIF
    
    // Inf fractal def
    IF low[Nside] <= lowest[Ncandles](low) THEN
    Fdown = low[Nside]
    signal = 1
    ENDIF
    
    // Draw signals
    IF signal = 1 THEN
    DRAWARROWUP(barindex[2],low[2]-Averagetruerange[5]/3)coloured(0,150,0)
    ELSIF signal = -1 THEN
    DRAWARROWDOWN(barindex[2],high[2]+Averagetruerange[5]/3)coloured(255,0,0)
    ENDIF
    
    Return Fup as "Fup", Fdown as "Fdown"

    I’d like to open following positions :

    On signal Fup, buy 1 shares at market / take profit @ 0.3% / Stop loss @ 0.10%
    On signal Fdown, sell short 1 shares at market / take profit @ 0.3% / Stop loss @ 0.10%

    Many thanks in advance !

    #117690 quote
    NicolasNicolas
    Keymaster
    Legend

    The strategy coded in this topic is exactly what you are requesting for: https://www.prorealcode.com/topic/fractal-systeme/

    It deals with entries made after new fractals are discovered.

    sahero thanked this post
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

Help translate a Fractal indicator into a Probacktest automatic trading


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
sahero @sahero Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/22/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...