Nicolas' 'Pivot Reversal Strategy Alert' – Coding

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #115604 quote
    Giddy
    Participant
    Junior

    Hi,

    Nicolas posted his ‘Pivot Reversal Strategy Alert’ indicator approximately one year ago (https://www.prorealcode.com/prorealtime-indicators/pivot-reversal-strategy-alerts/) and looks promising when manually backtesting.  Does anyone know if this has been coded to create an automated strategy, which will also help to backtest using different parameters?  Any help much appreciated.

    Thanks,

    Andrew

    #115610 quote
    GraHal
    Participant
    Master

    Here you are … found same as Screener here …

    https://www.prorealcode.com/topic/pivot-reversal-strategy-alerts-screener/#post-100958

    If you improve let us know please?

    The top Image attached is using a coded Trailing Stop … less Drawdown, but less Profit also.

    DEFPARAM CUMULATEORDERS = False
    //PRC_Pivot Reversal Strategy | indicator
    //14.02.2019
    //Nicolas @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge
    // — settings
    leftp = 82//4
    rightp = 20 //2
    // — end of settings
    period=max(leftp,rightp)
    hh = highest[period](high)
    ll = lowest[period](low)
    if hh<>hh[1] then
    hhbar=barindex
    hhprice=high
    endif
    if ll<>ll[1] then
    llbar=barindex
    llprice=low
    endif
    if barindex-hhbar=rightp then
    //drawtext("•",hhbar,hhprice) coloured(168,168,168)
    top=hhprice
    endif
    if barindex-llbar=rightp then
    //drawtext("•",llbar,llprice) coloured(168,168,168)
    bottom=llprice
    endif
    //atr=averagetruerange[14]
    x = 0
    if high crosses over top and lastsig<=0 then
    //drawarrowup(barindex,low-atr/2) coloured(30,144,255)
    lastsig=1
    x = 1
    endif
    if low crosses under bottom and lastsig>=0 then
    //drawarrowdown(barindex,high+atr/2) coloured(255,48,48)
    lastsig=-1
    x = 2
    endif
    //SCREENER[x](x AS "1=↑, 2=↓")
    If X =1 Then
    Buy at Market
    //SET STOP PLOSS A44
    //SET TARGET PPROFIT A45
    Endif
    
    If X =2 Then
    SellShort at Market
    //SET STOP PLOSS A50
    //SET TARGET PPROFIT A51
    Endif
     
    
    Edmond and Nicolas thanked this post
    Giddy.jpg Giddy.jpg
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Nicolas' 'Pivot Reversal Strategy Alert' – Coding


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Giddy @andrew_gidman Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 12/30/2019
Status: Active
Attachments: 1 files
Logo Logo
Loading...