Simple breakout

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

    Hello, I’m new to PRT and just try to start with some basics. And….I just come up with some questions.

    My intention is to enter the market with a long position as soon as the actual close is above the highest highs of the previous 5 bars. When my fist bar is January 1 does highest[5](high) mean the highest high of Jan 1 – Jan 5? Then I would put the actual close with the bar number 6 in front of it?

    Then I figured out that the opening will be always the next and not the current bar, but the ladder one is essential for me as I trade in daily bar mode. I reads somewhere there’s a way to use a limit order.

    So my idea:

     

    Does I make work to trade at the current bar, as soon as the close price crossed the upper channel?

    Thank you for your help.

    DMas

    #67779

    To write code, please use the <> “insert PRT code” button, to make code easier to read and understand. Thank you.

     

    #67780

    It is not possible to reference future data (candles/bars).

    It is only possible to reference past data.

    So whatever day or timeframe you are,

    will always refer to the highest price of the LAST 5 bars, that is from HIGH[0] through HIGH[4]. If you want to refer to the LAST previous 5 bars you’ll have to write

    Any code will be executed ONLY, as of this version of the platform, when each bar closes, whose high price may refrenced as HIGH[0] or just HIGH, then HIGH[1], and so on….

     

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