I have decided to start a new thread to handle this indicator. The old one was started by someone else and the code was buried in it as well as other code and out dated versions. This thread is mine to manage or mangle.
This is the same code as before, there is no need to download this version if you had the latest from the other thread (Sep 25, 2011). Any updates will be made in this post and not ad hoc in later posts. Requests for explanations and bug reports can be posted here.
-------------------------------------------------------------------------------
This indicator will alert when the price has moved to within a specified number of pips to the MA. Every kind of MA can be specified. There is also an email alert.
These are the inputs and their meaning.
AlertPips=10; // distance from close to MA in pips.
AlertBarsSkip=3; // number of bars to skip before next alert.
MAperiods=10; // MAperiods - the number of periods to be used by the MA calculation.
MAmethod="E"; // MAmethod - the method to be used by the MA calculation ('S', 'W', 'E', 'M').
MAapply="C"; // MAapply - the price type to be used by the MA calculation ('M', 'T', 'O', 'C', 'H', 'L').
MAshift=0; // MAshift - the number of periods for the MA shift calculation.
CloseBar=false // true means sending the alert only after the bar has closed and is still greater than the target distance from the MA.
MailAlert=false// set to true to receive emails. This option only works if the platform is properly configured for email.
This is the same code as before, there is no need to download this version if you had the latest from the other thread (Sep 25, 2011). Any updates will be made in this post and not ad hoc in later posts. Requests for explanations and bug reports can be posted here.
-------------------------------------------------------------------------------
This indicator will alert when the price has moved to within a specified number of pips to the MA. Every kind of MA can be specified. There is also an email alert.
These are the inputs and their meaning.
AlertPips=10; // distance from close to MA in pips.
AlertBarsSkip=3; // number of bars to skip before next alert.
MAperiods=10; // MAperiods - the number of periods to be used by the MA calculation.
MAmethod="E"; // MAmethod - the method to be used by the MA calculation ('S', 'W', 'E', 'M').
MAapply="C"; // MAapply - the price type to be used by the MA calculation ('M', 'T', 'O', 'C', 'H', 'L').
MAshift=0; // MAshift - the number of periods for the MA shift calculation.
CloseBar=false // true means sending the alert only after the bar has closed and is still greater than the target distance from the MA.
MailAlert=false// set to true to receive emails. This option only works if the platform is properly configured for email.
Attached File(s)
Pips2MA.ex4
6 KB
|
4,180 downloads