Take US 500 (SPX) cash as an example – currently trading at 3815.
If the code gives a level of 3723-60, it resizes the 15M chart to show this indicator .
Is there anyway of including the indicator on the price chart but not resizing the chart – therefore if you scroll you will be able to see it but if the values are not close to last price then you won’t ?
Thanks
Try this:
if barindex >= 1 then
If Month<>Month[1] then
monthlyH = Highest[BarIndex - lastMonthBarIndex](High)[1]
monthlyL = Lowest[BarIndex - lastMonthBarIndex](Low)[1]
lastMonthBarIndex = BarIndex
if trimH=0 then
trimH=monthlyH
endif
trimH=max(trimH,monthlyH)
if trimL=0 then
trimL=monthlyL
endif
trimL=min(trimL,monthlyL)
if openmonth=4 or openmonth=7 or openmonth=10 or openmonth=1 then
trimestrialH=trimH
trimestrialL=trimL
endif
Endif
drawsegment(barindex-1,trimestrialH[1],barindex,trimestrialH) coloured(0,0,0)
drawsegment(barindex-1,trimestrialL[1],barindex,trimestrialL) coloured(0,0,0)
endif
return
On a Germany 30 DFB chart this indicator on price will show a level of 13620 – 13724.
On a 15M timeframe chart the whole chart resizes to show current values and this indicator. Is there any way in PRT v11.1 to have the indicator within the price section but for the chart NOT to resize and therefore will only come into display as the price gets near to the indicator value?
Thanks
Yes – use the code that I posted in answer to the first time that you asked the same question!
Thanks apologies I was having some issues and didn’t see it the first time