Hi there,
Sometimes the operation of an my indicators needs to be slight;y different if the indicator was run as a result of a call to iCustom as opposed to how the indicator would normally run if it was attached to a chart.
Is there a simple function or method within MQL that one can use within an indicator to determine if the indicator was explicitly run because it was attached to a chart or if the indicator was run as a result of a call to iCustom?
As a fudge I have been including a boolean parameter to my indicators called 'Custom' with a default value of false. If I make a call to iCustom to run the indicator then I set this parameter to true instead. That way I can tell within my indicator whether the indicator is running as a result of a call to iCustom.
Surely there must be some function like say IsCustom() which returns true of the indicator was run via iCustom or false otherwise.
Does anyone have an elegant, simple way of determining whether an indicator was run as a result of being called via iCustom?
Regards,
Laurence.
Sometimes the operation of an my indicators needs to be slight;y different if the indicator was run as a result of a call to iCustom as opposed to how the indicator would normally run if it was attached to a chart.
Is there a simple function or method within MQL that one can use within an indicator to determine if the indicator was explicitly run because it was attached to a chart or if the indicator was run as a result of a call to iCustom?
As a fudge I have been including a boolean parameter to my indicators called 'Custom' with a default value of false. If I make a call to iCustom to run the indicator then I set this parameter to true instead. That way I can tell within my indicator whether the indicator is running as a result of a call to iCustom.
Surely there must be some function like say IsCustom() which returns true of the indicator was run via iCustom or false otherwise.
Does anyone have an elegant, simple way of determining whether an indicator was run as a result of being called via iCustom?
Regards,
Laurence.