Leo

Daily data for intraday timeframe

Category: Indicators By: Leo Created: January 15, 2018, 9:26 AM
January 15, 2018, 9:26 AM
Indicators
9 Comments
Daily data for intraday timeframe

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.

//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"

Download
Filename: daily-data-for-intraday-TF.itf
Downloads: 183
Download
Filename: Screen-Shot-2018-01-14-at-12.17.24.png
Downloads: 48
Leo
Leo Veteran
" IF YOU HAVE WEALTH , IT'S A DUTY TO HELP THOSE WHO DON'T " Manoj Bhargava
Author’s Profile

Comments

Leo
Leo
9 years ago
#

..for some reason I can not add PRT code properly... anyway

Leo
Leo
8 years ago
#

I have to check

Gianluca
8 years ago
#

Sorry but the 2° code that you posted have some problem it doesn't work

Vonasi
9 years ago
#

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.

Nicolas
9 years ago
#

Sorry again, doing my best to fix this problem..

Leo
Leo
9 years ago
#

//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"

Leo
Leo
9 years ago
#

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

swapping
9 years ago
#

Merci Leo, very cool simplement pour la visualisation des plus haut et bas de la journée passée cela va servir...

Vonasi
9 years ago
#

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?

ProRealCode ProRealCode
Loading...