Hi all,
This indicator creates lines in a intraday timeframe chart:
- highest daily price
- lowest daily price
- average close price
- yesterday close
- yesterday typical price
Hope it is useful for you as for me.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
//DAILY VALUES FOR INTRADAY //Author: LEO //Variable as input: D D = 20 once DayAverage=Dclose(1) once DAYHIGHER=Dhigh(1) once DAYLOWER=Dlow(1) DAYCLOSE=Dclose(1) TYPICALDAY=(DHIGH(1)+DLOW(1)+DAYCLOSE)/3 IF TYPICALDAY <> TYPICALDAY[1] THEN DayAverage=0 DAYHIGHER=Dhigh(1) DAYLOWER=Dlow(1) FOR i=1 to D DO DayAverage=DCLOSE(i)+DayAverage DAYHIGHER=max(DAYHIGHER,Dhigh(i)) DAYLOWER=min(DAYLOWER,Dlow(i)) NEXT DayAverage=DayAverage/D ENDIF return DayAverage as "Day Close Average", DAYCLOSE as "Yesterday Close", TYPICALDAY as "YesterdTypical Price", DAYLOWER as "Minimum day", DAYHIGHER as "Maximum Day" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Thanks for sharing this Leo. I love anything that helps us understand where we are at in the price action. Mondays are a bit of an issue though as they will use the normally very flat Sunday levels. You could possibly add some code so that on Monday Friday’s levels are used?
Merci Leo, very cool simplement pour la visualisation des plus haut et bas de la journée passée cela va servir…
Thanks for the suggestion @Vonasi
Here my code.
I also made another modification that is to calculate the average in day frame with the close of the each bar
//DAILY VALUES FOR INTRADAY v1.1
//Author: LEO
//Variable as input: DAYS
once DAYHIGHER=Dhigh(1)
once DAYLOWER=Dlow(1)
once DayAverage=DCLOSE(i)
DAYCLOSE=Dclose(1)
TYPICALDAY=(DHIGH(1)+DLOW(1)+DAYCLOSE)/3
IF TYPICALDAY TYPICALDAY[1] and DayOfWeek >= 1 THEN
DayAverage0=0
DAYHIGHER=Dhigh(1)
DAYLOWER=Dlow(1)
FOR i=1 to D-1 DO
DayAverage0=DCLOSE(i)+DayAverage0
DAYHIGHER=max(DAYHIGHER,Dhigh(i))
DAYLOWER=min(DAYLOWER,Dlow(i))
NEXT
i=DayOfWeek
ii=0
WHILE i = 1 THEN
DayAverage=(DayAverage0+close)/(D-ii)
ENDIF
return DayAverage as “Day Close Average”, DAYCLOSE as “Yesterday Close”, TYPICALDAY as “YesterdTypical Price”, DAYLOWER as “Minimum day”, DAYHIGHER as “Maximum Day”
..for some reason I can not add PRT code properly… anyway
Thanks for that Leo. Apparently there is some fault with the site that means posting code is not working in the library comments – so don’t worry it is not just you.
Sorry again, doing my best to fix this problem..
Sorry but the 2° code that you posted have some problem it doesn’t work
I have to check