Long only box scalping strategy

Forums ProRealTime English forum ProOrder support Long only box scalping strategy

Viewing 3 posts - 1 through 3 (of 3 total)
  • #123870

    Hi guys, there’s a scalping strategy on trading view that’s been posted by one of the traders. I’d like to convert this into prorealtime code. The code is pasted below. I would greatly appreciate it if this can be done

    //@version=2
    //  Name: P&F Mex Scalp strat
    //  Author:  Ahsan
    //  Revision: 0.1
    //  Date:     11-Jun-2018
    strategy(“P&F scalp strat”, shorttitle=”MEXlongOnly_strat”, overlay=true)
    timeframe = input(‘3’)
    box = input(‘Traditional’)
    boxsize = input(25, type=float)
    reversal = input(1)
    pnf = pointfigure(tickerid, ‘close’, box, boxsize, reversal)
    pnf_open= security(pnf, timeframe , open)
    pnf_close= security(pnf, timeframe , close)
    p1 = plot(pnf_open, title=”pnf_open”, color=green)
    p2 = plot(pnf_close,  title=”pnf_close”,color=maroon)
    base = pnf_close> pnf_open? pnf_close: pnf_open
    p0 = plot(base, title=”base”, color=gray)
    fill(p0, p1, color=green, transp=70)
    fill(p0, p2, color=maroon, transp=70)
    entry() => (base > pnf_open)
    exit() => (base > pnf_close)
    alertcondition(entry(), title=’buy’, message=’buy!’)
    alertcondition(exit(), title=’sell’, message=’sell!’)
    strategy.risk.allow_entry_in(strategy.direction.long)
    strategy.entry(“Long”, long=true, when=entry())
    strategy.entry(“close”, false, when=exit())
    #123871

    Welcome to the forums Byron. There is a procedure for requesting a free code conversion. You will find the details under ‘Help’ or by following this link:

    https://www.prorealcode.com/free-code-conversion/

    You must provide as much information as possible so that the person doing the code conversion does not have to waste time doing research to fully understand what they are supposed to be creating for you. You have missed the following information from your request.

      • Add a complete description and any useful information about the original code
      • Add attachments files: screenshots, documents, code files

    Please update this topic with the missing information rather than start a new one now.

    Also you posted your topic in the wrong forum. ProBuilder is for indicator topics. ProOrder is for strategy related topics. I have moved your post to the correct forum. Please try to be careful to choose the correct forum with any future topics.

     

    #123898

    This code is using the direction of a point and figure chart to open new order. While it is not possible to use directly the P&F charts to create automated trading system, we can use custom code to simulate them and therefore make systems based on. This strategy available in the library is the perfect example:  Point and figure charts automated trading system

    You only need to adapt these 2 settings to match the tradingview code you have shared:

    Boxsize = 25
    turnafternn = 1
    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login