Backtest FX Strategy

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

     

    Currently using the below screener to check for large moves on Fridays in FX pairs. I need to add the following parameters:

    1. – Price above BB in uptrend or below BB in downtrend (Daily)
    2. – RSI Above 65 in uptrend or below 35 in downtrend (Daily)
    3. – Price at highest weekly close in uptrend or lowest weekly close in downtrend (Daily)

     

     

    Signal = 0
     
    If DayOfWeek = 5 and OpenTime = 080000 then
    xOpen080000 = Open
    ElsIf DayOfWeek = 5 and OpenTime = 210000 then
    xClose210000 = Close
    EndIf
     
    xMovedown = ((xOpen080000 - xClose210000) / xOpen080000)
    xMoveUp = ((xClose210000 - xOpen080000) / xOpen080000)
     
    If xMovedown > xPercent then
    Signal = 1
    Elsif xmoveUp > xpercent then
    Signal = 1
    EndIf
     
    Screener[Signal]
    #207088 quote
    JS
    Participant
    Master

    Hi @Philey

    Here is the screener…

    You can set the periods of the different signals (Bollinger, RSI, Highest, Lowest) yourself…

    TimeFrame(Daily)
    S1=BollingerUp[5](close)
    S2=BollingerDown[5](close)
    S3=RSI[5](close)
    S4=Highest[5](Close)
    S5=Lowest[5](Close)
    
    TimeFrame(1 hour)
    Signal=0
    xPercent=1 //Minimal 1% move
     
    If DayOfWeek = 5 and OpenTime = 080000 then
    xOpen080000 = Open
    ElsIf DayOfWeek = 5 and OpenTime = 210000 then
    xClose210000 = Close
    EndIf
     
    xMove = ((xClose210000 - xOpen080000) / xOpen080000)*100
    
    C1=xMove>= xPercent
    C2=xMove<= -xPercent
    C3=xClose210000>S1
    C4=xClose210000<S2
    C5=S3>65
    C6=S3<35
    C7=xClose210000>=S4
    C8=xClose210000<=S5
    
    If C1 and C3 and C5 and C7 then
    Signal=1
    ElsIf C2 and C4 and C6 and C8 then
    Signal=2
    EndIf
     
    Screener[Signal](Signal as "1=Long, 2=Short")

    Scherm­afbeelding-2023-01-08-om-22.40.48.png Scherm­afbeelding-2023-01-08-om-22.40.48.png
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

Backtest FX Strategy


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Philley @philley Participant
Summary

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

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 01/08/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...