Help with Strategy with wick pressure

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #212216 quote
    Aragorna
    Participant
    Junior
    //PRC_Wick Pressure | indicator
    //23.05.2022
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted from pinescript
     
    // --- settings
    //atrmult = 0.7 //ATR Multiplier (The Wick area is filtered on the basis of atr and this is multiplier to that ATR. The more the multiplier value, the less the signals and vice versa)
    //boxlength = 16 //Length of Wick Pressure Box
    //rsiob = 60 //RSI based on which signnals are filtered
    //rsios = 40 //RSI based on which signnals are filtered
    // --- end of settings
     
    meersi = rsi[14](close)
    signal = 0
    //bullish wick pressure
    rsibullishcond = meersi < rsios or meersi[1] < rsios or meersi[2] < rsios
    ll3 = lowest[3](low)
    lc3 = min(lowest[3](close),lowest[3](open))
    if low<=lc3 and low[1]<=lc3 and low[2]<=lc3 and open>=lc3 and open[1]>=lc3 and open[2]>=lc3 and lc3-ll3>(atrmult*AverageTrueRange[14](close)) and rsibullishcond and close>open then
       drawrectangle(barindex,lc3,barindex+boxlength, ll3) coloured("green",50) bordercolor("green")
       signal = 1
    endif
     
    //bearish wick pressure
    rsibearishcond = meersi > rsiob or meersi[1] > rsiob or meersi[2] > rsiob
    hh3 = highest[3](high)
    hc3 = max(highest[3](close), highest[3](open))
    if high>=hc3 and high[1]>=hc3 and high[2]>=hc3 and open<=hc3 and open[1]<=hc3 and open[2]<=hc3 and hh3-hc3>(atrmult*AverageTrueRange[14](close)) and rsibearishcond and close<open then
       drawrectangle(barindex,hh3,barindex+boxlength, hc3) coloured("red",50) bordercolor("red")
       Signal = -1
    endif
    return Signal AS "Signal"

    Hello to everyone, I need an help how to implement this indicator in a strategy https://www.prorealcode.com/prorealtime-indicators/wick-pressure/, I’m still struggling with learning Code with PRT and this would be of great help. Original indicator by Nicholas was kindly modified by Roberto but I don’t have the knownledge to continue. When indicator gives Signal=1, I want to buy n shares, with stop loss under the limit of the box, viceversa with bearish signal I want to sell short, with stop loss over the limit of the rectangle. I’m not able to recall lc3, ll3, hc3 and hh3. anyone can suggest me how to do it? many thank’s in advance

    Alessio

    #212266 quote
    JS
    Participant
    Senior

    You can turn this indicator into a trading system by “removing” all graphic elements and adding orders and possibly SL and TP…

    DefParam CumulateOrders = False
    
    // --- settings
    atrmult = 0.7 //ATR Multiplier (The Wick area is filtered on the basis of atr and this is multiplier to that ATR. The more the multiplier value, the less the signals and vice versa)
    boxlength = 16 //Length of Wick Pressure Box
    rsiob = 60 //RSI based on which signnals are filtered
    rsios = 40 //RSI based on which signnals are filtered
    // --- end of settings
     
    meersi = rsi[14](close)
    signal = 0
    //bullish wick pressure
    rsibullishcond = meersi < rsios or meersi[1] < rsios or meersi[2] < rsios
    ll3 = lowest[3](low)
    lc3 = min(lowest[3](close),lowest[3](open))
    if low<=lc3 and low[1]<=lc3 and low[2]<=lc3 and open>=lc3 and open[1]>=lc3 and open[2]>=lc3 and lc3-ll3>(atrmult*AverageTrueRange[14](close)) and rsibullishcond and close>open then
    //drawrectangle(barindex,lc3,barindex+boxlength, ll3) coloured("green",50) bordercolor("green")
    signal = 1
    endif
    If signal = 1 then
    Buy 1 contract at Market
    Set Stop Loss 10
    EndIf
    
    //bearish wick pressure
    rsibearishcond = meersi > rsiob or meersi[1] > rsiob or meersi[2] > rsiob
    hh3 = highest[3](high)
    hc3 = max(highest[3](close), highest[3](open))
    if high>=hc3 and high[1]>=hc3 and high[2]>=hc3 and open<=hc3 and open[1]<=hc3 and open[2]<=hc3 and hh3-hc3>(atrmult*AverageTrueRange[14](close)) and rsibearishcond and close<open then
    //drawrectangle(barindex,hh3,barindex+boxlength, hc3) coloured("red",50) bordercolor("red")
    Signal = -1
    endif
    If signal = -1  then
    SellShort 1 contract at Market
    Set Stop Loss 10
    EndIf
    Nicolas thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Help with Strategy with wick pressure


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Aragorna @aragorna Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/27/2023
Status: Active
Attachments: No files
Logo Logo
Loading...