Daily Moving Average with (CustomClose?) on non Daily Timeframe
Forums › ProRealTime English forum › ProBuilder support › Daily Moving Average with (CustomClose?) on non Daily Timeframe
- This topic has 8 replies, 2 voices, and was last updated 8 years ago by Nicolas.
-
-
07/23/2016 at 2:18 PM #10826
At this stage ProRealtime doesn’t have multi timeframe capabilities. However one easy possibility I thought would be to use the moving average of the daily timeframe with the options of DOpen, DHigh, DLow, DClose on another timeframe but I’m not convinced it works. Hopefully this might be useful and someone else can check it.
I tried to add CustomClose but I don’t think that’s possible because then it would calculate the current timeframe of the moving average
Also how do you get it to display in the Price window? I worked this out. You click the Wrench and Add Indicator that way!
1234567891011// Please note if you're using IG there's a smaller number of days you can use and the smaller the timeframe the small number of days you can useperiods = p // daysLMA=0 // Loop MAFOR i = 0 TO periods-1 DO // Need -1 so the Result is the number of periods we actaully wantLMA = DClose(i) + LMA // DOn't think this is possible CustomClose[(i)]NextLMAactual = (LMA / (periods))RETURN LMAactual+MA AS "Daily MA"07/28/2016 at 4:10 PM #10956Unfortunately this code has live limitations due to the:
123<span class="token keyword">DEFPARAM</span> <span class="token keyword">PRELOADBARS = 50000 // maxIt will work on higher time frames ok but on m1 you're limited to use 3 days max :(</span>I think my time with PRT is going to be short lived.
07/28/2016 at 7:01 PM #1096707/31/2016 at 6:43 AM #11013Thanks Nicolas. I will submit it to the Library.
I’m still not sure what the second numeral can be used for during optimization. The documentation says:
Personal Indicators
It is possible to call ProBuilder indicators that you have programmed using the “CALL” instruction in a trading system.
Example:
a,b = CALL “HistoMACD[5,6]” // a and b are the outputs of the function. 5 & 6 are the inputs.
To learn more about optimal use of the CALL function, read the section dedicated to optimizing your programs carefully.
But I can’t find this section in the documentation “optimizing your programs carefully”?
07/31/2016 at 10:42 AM #1101607/31/2016 at 11:22 AM #11019For example in the above there’s
a,b = CALL “HistoMACD[5,6]” // a and b are the outputs of the function. 5 & 6 are the inputs.
- why is there “a,b”
When you add my Daily Moving Average to a system it shows
indicator2 = CALL “01 Daily Moving Average”[48, 0]
2. I know 48 is the actual moving average but what is the “0” for?
07/31/2016 at 4:20 PM #1103712/19/2016 at 8:51 AM #18761Hi Nicolas
I was going to upload this to the Indicator Code Library but I keep getting a HTTP error when I try with Firefox and Chrome?
I guess you can add it?
Title: Moving Average Daily
At this stage ProRealtime doesn’t have multi timeframe capabilities. However one easy possibility is to use the moving average of the daily timeframe with the options of DOpen, DHigh, DLow, DClose and that’s what this indicator enables you to do.
You can select the number of periods ie. Days:
number of periods/days (please note there’s a limit depending on the timeframe you use this on and there’s a difference between PRT and IG data periods)
open/high/low/close, etc…If you are going to use this in a live trading account you will need to set:
DEFPARAM Preloadbars =
Here is the table of how much Preloadbars you will need depending how many periods you want to look back. The column max days shows the maximum of what you can set Preload to. As an example of you are using a 10 minute timeframe the maximum DEFPARAM Preloadbars = 35 // you can only have moving average of 35 days maximum.
DEFPARAM Preloadbars = 60 24 5000 Minutes bars per hour bars per day max days 1 60 1440 3 5 12 288 17 10 6 144 35 15 4 96 52 30 2 48 104 60 1 24 208 12/19/2016 at 3:03 PM #18793 -
AuthorPosts
Find exclusive trading pro-tools on