test the relative bias filter

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39937 quote
    victormork
    Participant
    Veteran

    Hi, I would like to do some testing on the relative bias filter posted by Maz in the indicator library. I would like to just try generating a sell signal when the result line is coming down fro

    DEFPARAM CumulateOrders = false
    // Variables
    response    = 20
    cutoff      = 5
    dynamicMode = 1 // true | false
    
    
    once cutoff   = min(45, max(1, cutoff))
    once response = max(2, response)
    once btm = 0   + cutoff
    once top = 100 - cutoff
    if dynamicMode then
    period = response*2 //200
    endif
    ar = rsi[response](average[period](TypicalPrice))
    resultLine = min(top, max(btm, ar))
    
    sc1 = resultline < 95
    sc1 = sc1 and resultline[2] > 95
    
    If sc1 then
    sellshort 1 contract at market
    endif
    
    If shortonmarket and resultline > resultline[1] then
    exitshort at market
    endif

     

    m the top cut off line. However I have not managed to get the code right. Is there any suggestions on solve my problems?

    #40216 quote
    Nicolas
    Keymaster
    Legend

    Your problem is that your “resultline” variable is never higher than 95, so obviously the “sc1” condition is never fulfilled and no orders are triggered 🙂

    #40346 quote
    victormork
    Participant
    Veteran

    thanks!

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

test the relative bias filter


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
victormork @victormork Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by victormork
9 years, 2 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/06/2017
Status: Active
Attachments: No files
Logo Logo
Loading...