Conversion of BarUpDn strategy from tradingview pinescript

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #172374 quote
    martobrien1
    Participant
    New

    Hi Folks

    Anyone that can convert this pinescript from trading view for this simple strategy of entry on bar 2 and exit on other 2nd bar, for both long and short.

    Thanks to anyone who can master coding for me, Margaret

    C below the strategy code pasted

    //@version=4
    strategy(“BarUpDn Strategy”, overlay=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 10)
    maxIdLossPcnt = input(1, “Max Intraday Loss(%)”, type=input.float)
    strategy.risk.max_intraday_loss(maxIdLossPcnt, strategy.percent_of_equity)
    if (close > open and open > close[1])
    strategy.entry(“BarUp”, strategy.long)
    if (close < open and open < close[1])
    strategy.entry(“BarDn”, strategy.short)
    //plot(strategy.equity, title=”equity”, color=color.red, linewidth=2, style=plot.style_areabr)

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Conversion of BarUpDn strategy from tradingview pinescript


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 06/24/2021
Status: Active
Attachments: No files
Logo Logo
Loading...