Change the indicator so it uses an extern that sets the Period.
RaptorUK:
Change the indicator so it uses an extern that sets the Period.
Actually I decided to put the actual calculation in a function in an include file, that way I can call it directly and don't have to put in any error checking to make sure the user doesn't accidentally enter an invalid Period into an extern variable.
Change the indicator so it uses an extern that sets the Period.
FoxGuy:
I have a Custom Indicator that displays different values depending on what Period() is used in the chart it is attached to.
I have no extern variable to set the the period because it just uses Period() to set up the indicator.
How can I pass a value to the indicator to let it know which Period to use to get the value I want?
- No extern variables needed
- iCustom( symbol, timeframe, ....
WHRoeder:
I have been trying to make that work, but no matter what I do I keep getting 0. I'm guessing that it has something to do with the fact that the indicator uses Period() to determine what buffers, line styles, etc to use, but I'm not sure. It just seems to make more sense to me to move the actual calculation into an Include file and pass it a timeframe and bar#, then I can call it from any function and not have to load the indicator.
- No extern variables needed
- iCustom( symbol, timeframe, ....
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have a Custom Indicator that displays different values depending on what Period() is used in the chart it is attached to.
I have no extern variable to set the the period because it just uses Period() to set up the indicator.
How can I pass a value to the indicator to let it know which Period to use to get the value I want?