I am trying to generate a piece of code that will provide a buy or sell signal on the chart dependent on when we break above or below the highest or lowest point of the last 5 periods.
I am sure this is easily done however I am inexperienced in coding.
// Use this on the 1 seconds chart and change 5 to whatever the sconds value of your timeframe x5 (so 5 mins would be [300]
The only issue is that with 1,000,000 units you can only test about 1 month in backtest…. If you are happy entering on the close of the 1 minute candle run it on the 1 minutes..
There are programming manuals on here to download, and a programming coarse I’d recommend…
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue