Indicator is a PopGun marker. Every timeframe (based minute, hour, day, month, quarter) is calculated and therefore drawn correctly in the chart – except all weekly based data (like weekly, 2 weeks, 3 weeks…).
Code is simple
PG Marker
1
2
3
4
5
6
7
8
9
10
11
12
13
// Popgun: middle candle totally enclosed by previous and following candle
It would be much easier if you add a vertical grid on the chart.
Your x axis is in Months and squinting my eyes and trying to line up there appears to be 4 or 5 bars in each month? Isn’t that correct? some months contain 4 Fridays and some months contain 5 Fridays?
Thanks GraHal for your answer. I have changed the code for drawing a bit, so it might be easier to see where the problem is. The code should mark the Popgun (which is the outside of an inside) with an arrow and draw range lines for the 3-candle range (1st candle, inside, outside). This is working fine in all timeframes – except weekly. This is PRT 10.3, , IG live and it happens in index, forex, commodities but then again shares are correctly painted.
In the picture the first two columns are all correct, from second up to month (just one quarter but that’s also ok). The third column shows the weekly result and weekbased, like 2 weeks, 3 weeks … As you can see the PG is marked one candle too early and consequently the range too. In the code I added a line to tell the value of the PGs top which is correct in week.
I attach the script, so you can check. I have really no idea what is causing this.
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