Get each day’s highest/lowest MACD for the past 5 days
Forums › ProRealTime English forum › ProBuilder support › Get each day’s highest/lowest MACD for the past 5 days
- This topic has 11 replies, 3 voices, and was last updated 1 year ago by Trianenn.
Viewing 12 posts - 1 through 12 (of 12 total)
-
-
02/12/2023 at 5:03 PM #20955602/13/2023 at 11:31 AM #20959002/13/2023 at 2:00 PM #20960702/13/2023 at 3:04 PM #20961402/13/2023 at 4:41 PM #20962502/13/2023 at 6:07 PM #209632
I was thinking of different manner to do it, here is the code that calculate the mean of the last “period” days of highest and lowest MACD values.
123456789101112131415161718192021222324252627period = 5// ---------------------------imacd=MACD[12,26,9](close)once hh = imacdonce ll = imacdif IntradayBarIndex =0 thenii=ii+1$hh[ii]=imacd$ll[ii]=imacdendif$hh[ii]=max(imacd,$hh[ii])$ll[ii]=min(imacd,$ll[ii])//meanif ii>period thensum = 0for i = ii downto ii-period dosum=sum+($hh[i]+$ll[i])/2nextmean=sum/periodendifreturn mean//,$hh[ii],$ll[ii]1 user thanked author for this post.
02/14/2023 at 9:11 AM #209646Thanks a lot Nicolas!
I’m going to give a try and see if I can tailor it further.
Does the graph have to extend beyond the period (5 days) to calculate the values or can they be calculated independently of the graph’s history length?
02/14/2023 at 9:44 AM #209648Link to above code added as Log 353 here …
1 user thanked author for this post.
02/14/2023 at 10:24 AM #20965102/14/2023 at 1:30 PM #20966302/15/2023 at 10:52 AM #20972502/15/2023 at 2:35 PM #209764 -
AuthorPosts
Viewing 12 posts - 1 through 12 (of 12 total)
Find exclusive trading pro-tools on
Similar topics: