PRC TSR DailyRange
Forums › ProRealTime English forum › ProBuilder support › PRC TSR DailyRange
- This topic has 2 replies, 2 voices, and was last updated 8 months ago by mathiasKN.
Viewing 3 posts - 1 through 3 (of 3 total)
-
-
03/01/2024 at 9:24 AM #229016
Hi,
Can someone please help me out how I import a code for setting specific hours (RTH/ETH f.ex) on this indicator?
PRC TSR DailyRange123456789101112131415161718192021222324252627282930313233343536373839404142434445//PRC_TSR_DailyRange_display | indicator//11.12.2018//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//translated from MT4 versiondefparam drawonlastbaronly=trueif day<>day[1] thenstartbar=barindexFIVE=0TEN=0TWENTY=0for i = 1 to 20 doif i<6 thenFIVE=FIVE+(dhigh(i)-dlow(i))endifif i<11 thenTEN=TEN+(dhigh(i)-dlow(i))endifTWENTY=TWENTY+(dhigh(i)-dlow(i))nextFIVE = FIVE/10TEN = TEN/20TWENTY = TWENTY/40AV = (FIVE+TEN+TWENTY)/3endifHIDaily = dhigh(0)-(AV)LOWDaily = dlow(0)+(AV)HIDaily1 = dhigh(0)LOWDaily1 =dlow(0)HIDaily2 = dhigh(0)-(AV)*2LOWDaily2 =dlow(0)+(AV)*2drawrectangle(startbar,HiDaily,barindex,LOWDaily) coloured(128,0,0)drawrectangle(startbar,HiDaily1,barindex,LOWDaily1) coloured(0,100,0)drawrectangle(startbar,HiDaily2,barindex,LOWDaily2) coloured(0,44,9)center=max(startbar+(barindex-startbar)/2,1)drawtext("Top Daily Range",center,LowDaily2,Dialog,Bold,16) coloured(244,164,96)drawtext("Bottom Daily Range",center,HiDaily2,Dialog,Bold,16) coloured(244,164,96)drawtext(" High",barindex,dhigh(0),Dialog,Bold,16) coloured(154,205,50)drawtext(" Low",barindex,dlow(0),Dialog,Bold,16) coloured(154,205,50)drawtext(" Open",barindex,dopen(0),Dialog,Bold,16) coloured(244,164,96)RETURN03/01/2024 at 9:32 AM #229018This one will only work within the time range FromTime to ToTime:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748//PRC_TSR_DailyRange_display | indicator//11.12.2018//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//translated from MT4 versiondefparam drawonlastbaronly=trueFromTime = 100000ToTime = 160000if day<>day[1] thenstartbar=barindexFIVE=0TEN=0TWENTY=0for i = 1 to 20 doif i<6 thenFIVE=FIVE+(dhigh(i)-dlow(i))endifif i<11 thenTEN=TEN+(dhigh(i)-dlow(i))endifTWENTY=TWENTY+(dhigh(i)-dlow(i))nextFIVE = FIVE/10TEN = TEN/20TWENTY = TWENTY/40AV = (FIVE+TEN+TWENTY)/3endifIF Time >= FroMtime AND Time <= ToTime THENHIDaily = dhigh(0)-(AV)LOWDaily = dlow(0)+(AV)HIDaily1 = dhigh(0)LOWDaily1 =dlow(0)HIDaily2 = dhigh(0)-(AV)*2LOWDaily2 =dlow(0)+(AV)*2ENDIFdrawrectangle(startbar,HiDaily,barindex,LOWDaily) coloured(128,0,0)drawrectangle(startbar,HiDaily1,barindex,LOWDaily1) coloured(0,100,0)drawrectangle(startbar,HiDaily2,barindex,LOWDaily2) coloured(0,44,9)center=max(startbar+(barindex-startbar)/2,1)drawtext("Top Daily Range",center,LowDaily2,Dialog,Bold,16) coloured(244,164,96)drawtext("Bottom Daily Range",center,HiDaily2,Dialog,Bold,16) coloured(244,164,96)drawtext(" High",barindex,dhigh(0),Dialog,Bold,16) coloured(154,205,50)drawtext(" Low",barindex,dlow(0),Dialog,Bold,16) coloured(154,205,50)drawtext(" Open",barindex,dopen(0),Dialog,Bold,16) coloured(244,164,96)RETURN1 user thanked author for this post.
03/01/2024 at 9:40 AM #229020 -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
Find exclusive trading pro-tools on
Similar topics: