As an example of you are using a 10 minute timeframe the maximum DEFPARAM Preloadbars = 5000 // maximum is 5000 and this is equal to the moving average of 35 days.
|DEFPARAM Preloadbars =|
|Minutes||bars per hour||bars per day||max days|
You should find this indicator useful if you are trading mean reversion system and want to make an entry a timeframe less than the daily while using the daily moving average as the mean.
REMINDER: if you want the indicator to appear in the Price section of the chart, you must add it by clicking on the spanner icon on the little Price tab in the Price window.
// 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 use periods = p // days LMA=0 // Loop MA FOR i = 0 TO periods-1 DO // Need -1 so the Result is the number of periods we actually want LMA = DClose(i) + LMA // Don't think this is possible CustomClose[(i)] Next LMAactual = (LMA / (periods)) RETURN LMAactual AS "Daily MA"
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 :