Draw rectangle in the future – SMC
Forums › ProRealTime English forum › ProBuilder support › Draw rectangle in the future – SMC
- This topic has 1 reply, 2 voices, and was last updated 2 years ago by fifi743.
Viewing 2 posts - 1 through 2 (of 2 total)
-
-
11/06/2022 at 6:17 PM #203681
Hello, based on the Smart Money Concept, I would like to draw the Premium/Equilibrium/Discount zones on a Weekly, Daily, H4 and H1 basis, all displayed on a H1 chart (200 units).
With the indicator below, added Weekly, Daily, H4 and H1 on the same chart, I can see the weekly zones only when I display 50k units, which will slow the plateforme during trading hours.
The weekly Premium zone is around 4800pts and the Weekly Equilibrium zone is around 3500pts, which are not drawn on the H1 chart (200 units – graph2).
Is there a way to have all these zones on the H1 chart?
Thanks
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114//DEFPARAM CALCULATEONLASTBARS = 1000//defparam drawonlastbaronly=trueTIMEFRAME(WEEKLY)HiWeekly = highest[200](high) + 20LoWeekly = lowest[200](low) - 20TIMEFRAME(Weekly)//---external parameterscp = 20once lastpoint = 0ATR = averagetruerange[cp]//---major zigzag pointsif high[cp] >= highest[2*cp+1](high) thenLH = 1elseLH = 0endifif low[cp] <= lowest[2*cp+1](low) thenLL = -1elseLL = 0endifif LH = 1 thenTOPy = high[cp]TOPx = barindex[cp]endifif LL = -1 thenBOTy = low[cp]BOTx = barindex[cp]endif//---mino zigzag pointsif high[round(cp/2)] >= highest[cp+1](high) thenLLH = 1elseLLH = 0endif//if low[round(cp/2)] <= lowest[cp+1](low) thenLLL = -1elseLLL = 0endif//if LLH = 1 thenLTOPy = high[round(cp/2)]LTOPx = barindex[round(cp/2)]endif//if LLL = -1 thenLBOTy = low[round(cp/2)]LBOTx = barindex[round(cp/2)]endif/////////////if LH>0 and (lastpoint=-1 or lastpoint=0) then//DRAWTEXT("▼",TOPx,TOPy+ATR/2,Monospaced,Bold,20) coloured(200,0,0,255)//lastpoint = 1//endif//if LLH>0 then//DRAWTEXT("▽",LTOPx,LTOPy+ATR,Dialog,Bold,14) coloured(200,0,0,255)//endif//if LL<0 and (lastpoint=1 or lastpoint=0) then//DRAWTEXT("▲",BOTx,BOTy-ATR/2,Monospaced,Bold,20) coloured(0,200,0,255)//lastpoint = -1//endif//if LLL<0 then//DRAWTEXT("△",LBOTx,LBOTy-ATR,Dialog,Bold,14) coloured(0,200,0,255)//endif///////////// Definition Premium ZonePremPointH = max(TOPy,LTOPy)PremPointL = PremPointH -tr/3PremiumTextPoint = (PremPointH+PremPointL)/2// Definition Discount ZoneDiscountPointL = min(BOTy,LBOTy)DiscountPointH = DiscountPointL +tr/3DiscountTextPoint = (DiscountPointH+DiscountPointL)/2// Definition Equilibrium ZoneEquiPoint = (PremPointH+DiscountPointL)/2EquiPointH = EquiPoint + tr/4EquiPointL = EquiPoint - tr/4EquiTextPoint = EquiPointStartBox = min(TOPx-cp,BOTx-cp)TextBar = (barindex+20000 + StartBox)/2if IsLastBarUpdate thenDRAWRECTANGLE(StartBox, PremPointL, barindex+200000, PremPointH)coloured(200,0,0,50)bordercolor(200,0,0,255)DRAWTEXT("Premium Weekly", TextBar, PremiumTextPoint)coloured(200,0,0,255)DRAWRECTANGLE(StartBox, DiscountPointH, barindex+200000, DiscountPointL)coloured(0,200,0,50)bordercolor(0,200,0,255)DRAWTEXT("Discount Weekly", TextBar, DiscountTextPoint)coloured(0,200,0,255)DRAWRECTANGLE(StartBox, EquiPointH, barindex+200000, EquiPointL)coloured(128,128,128,50)bordercolor(128,128,128,255)DRAWTEXT("Equilibrium Weekly", TextBar, EquiTextPoint)coloured(128,128,128,255)endifRETURN HiWeekly,LoWeekly11/06/2022 at 7:14 PM #203684 -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)