hi,
I'm not very familiar with the http://docs.mql4.com/indicators/iCustom
symbol - Symbol the data of which should be used to calculate indicator. NULL means current symbol.
I guess it should work similar- as I normally use the Symbol() only once to assign it to a variable I use later.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
No idea if that works with my indies. for test I would keep it at 0
name - Custom indicator compiled program name.
... - Parameters set (if necessary). The passed parameters and their order must correspond with the desclaration order and the type of extern variables of the custom indicator.
I guess you would have to pass on as parameters the whole lot ( I think for single STO chart version there a 45) incl the additional string info too.
For the input variables I use some form of type assignment in the name:
e.g. the first small letter is the type identifier:
e.g.
s = string: sUniquePrefix
c = color: cInfoErrorObject
b = bool: bShowIndicatorInfo
i = int: iPastStartChartSHIFT
All the general infos are: strings
mode - Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.
That you should be able to see from the data window: but for the single line stochastic it should be 0
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Not sure: I guess it should work the same.
But you will have to play around with it and backcheck with a plotted version. Internally I use often a shift of 1. Take a couple of days to see if you can work out something: if so maybe you post shortly how you did it: might help someone else one day.
------------------------
here are the input parameters for the Single Stochastic chart interval:
//============================================================================
//---- Input parameters
//============================================================================
extern string ________READ_INFO________ = "<<< READ INFO >>>";
extern string __read1__ = "BELOW: UserInputOption StartWith";
extern string __read1a__ = "a Lowercase letter.";
extern string __read2__ = "-----------------------------";
extern string __read2a__ = "IMPORTANT: ThisIndicatorUses";
extern string __read2b__ = "ANoneStandardStochasticCalculation";
extern string __read2c__ = "UsingThe (Bar OPEN Price)";
extern string __read2d__ = "PlusForTheActiveBar (CLOSE Price)";
extern string __read3__ = "-----------------------------";
extern string __read3a__ = "PriceField = Low/High";
extern string __read3b__ = "%D = Fix set to 1";
extern string __read3c__ = "AndIsNotCalculated";
extern string __read3d__ = "Only %KFull Line IsCalculated";
extern string __read4__ = "-----------------------------";
extern string __read4a__ = "IMPORTANT: ThisIndicatorUses";
extern string __read4b__ = "A DelayedStart OnPurpose";
extern string ________READ_INFO_END________ = "<<< READ INFO END >>>";
extern string _____________0_____________ = "<<< GENERAL SETTINGS >>>";
extern string __Info0__ = "IfYouUseMultipleMJSTO";
extern string __Info0a__ = "OnOneChart: Make sUniquePrefix";
extern string __Info0b__ = "unique: e.g. 1MJSTO.., 2MJSTO..";
extern string sUniquePrefix = "MJSTO_Chart";
extern color cInfoErrorObject = DarkViolet;
extern string __Info01__ = "CanBeUsedToShowLabelsAndValues";
extern bool bShowIndicatorInfo = false;
extern string __Info02__ = "iPastStartChartSHIFT: HowMany";
extern string __Info02a__ = "ChartBarsWeCalculateIntoThePast";
extern string __Info02b__ = "AtFirstRun (Indicator Initialisation)";
extern string __Info02c__ = "MUST BeGreaterThan: 0";
extern string __Info02d__ = "OR USE: -1 ForAllPossibleBars";
extern int iPastStartChartSHIFT = -1;
extern string __Info03__ = "IMPORTANT: ThisIndicatorUses";
extern string __Info03a__ = "A 20 Second DelayedStart ";
extern string __Info03b__ = "OnPurpose";
extern string __Info03c__ = "IF Active(New Ticks [Quotes] Arrive)";
extern string __Info03d__ = "-----------------------------";
extern string __Info03e__ = "ButAtInactiveTimesToCheck";
extern string __Info03f__ = "PastResultsItIsNecessary";
extern string __Info03g__ = "ToSetTheDelayTo: false";
extern string __Info03h__ = "ATTENTION: SetTo >false<";
extern string __Info03i__ = "CanAtTimesProduceMistakes";
extern bool bStartDelay = true; // AtInactiveTimes set it to false: Otherwise it keeps hanging as we have no Tick loop and never comes over StartDelay
extern string _____________1_____________ = "<<< STO SETTINGS >>>";
extern int iKPeriod = 14;
extern int iKSlowing = 3;
Cheers
MJ
I'm not very familiar with the http://docs.mql4.com/indicators/iCustom
symbol - Symbol the data of which should be used to calculate indicator. NULL means current symbol.
I guess it should work similar- as I normally use the Symbol() only once to assign it to a variable I use later.
timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.
No idea if that works with my indies. for test I would keep it at 0
name - Custom indicator compiled program name.
... - Parameters set (if necessary). The passed parameters and their order must correspond with the desclaration order and the type of extern variables of the custom indicator.
I guess you would have to pass on as parameters the whole lot ( I think for single STO chart version there a 45) incl the additional string info too.
For the input variables I use some form of type assignment in the name:
e.g. the first small letter is the type identifier:
e.g.
s = string: sUniquePrefix
c = color: cInfoErrorObject
b = bool: bShowIndicatorInfo
i = int: iPastStartChartSHIFT
All the general infos are: strings
mode - Line index. Can be from 0 to 7 and must correspond with the index used by one of SetIndexBuffer functions.
That you should be able to see from the data window: but for the single line stochastic it should be 0
shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).
Not sure: I guess it should work the same.
But you will have to play around with it and backcheck with a plotted version. Internally I use often a shift of 1. Take a couple of days to see if you can work out something: if so maybe you post shortly how you did it: might help someone else one day.
------------------------
here are the input parameters for the Single Stochastic chart interval:
//============================================================================
//---- Input parameters
//============================================================================
extern string ________READ_INFO________ = "<<< READ INFO >>>";
extern string __read1__ = "BELOW: UserInputOption StartWith";
extern string __read1a__ = "a Lowercase letter.";
extern string __read2__ = "-----------------------------";
extern string __read2a__ = "IMPORTANT: ThisIndicatorUses";
extern string __read2b__ = "ANoneStandardStochasticCalculation";
extern string __read2c__ = "UsingThe (Bar OPEN Price)";
extern string __read2d__ = "PlusForTheActiveBar (CLOSE Price)";
extern string __read3__ = "-----------------------------";
extern string __read3a__ = "PriceField = Low/High";
extern string __read3b__ = "%D = Fix set to 1";
extern string __read3c__ = "AndIsNotCalculated";
extern string __read3d__ = "Only %KFull Line IsCalculated";
extern string __read4__ = "-----------------------------";
extern string __read4a__ = "IMPORTANT: ThisIndicatorUses";
extern string __read4b__ = "A DelayedStart OnPurpose";
extern string ________READ_INFO_END________ = "<<< READ INFO END >>>";
extern string _____________0_____________ = "<<< GENERAL SETTINGS >>>";
extern string __Info0__ = "IfYouUseMultipleMJSTO";
extern string __Info0a__ = "OnOneChart: Make sUniquePrefix";
extern string __Info0b__ = "unique: e.g. 1MJSTO.., 2MJSTO..";
extern string sUniquePrefix = "MJSTO_Chart";
extern color cInfoErrorObject = DarkViolet;
extern string __Info01__ = "CanBeUsedToShowLabelsAndValues";
extern bool bShowIndicatorInfo = false;
extern string __Info02__ = "iPastStartChartSHIFT: HowMany";
extern string __Info02a__ = "ChartBarsWeCalculateIntoThePast";
extern string __Info02b__ = "AtFirstRun (Indicator Initialisation)";
extern string __Info02c__ = "MUST BeGreaterThan: 0";
extern string __Info02d__ = "OR USE: -1 ForAllPossibleBars";
extern int iPastStartChartSHIFT = -1;
extern string __Info03__ = "IMPORTANT: ThisIndicatorUses";
extern string __Info03a__ = "A 20 Second DelayedStart ";
extern string __Info03b__ = "OnPurpose";
extern string __Info03c__ = "IF Active(New Ticks [Quotes] Arrive)";
extern string __Info03d__ = "-----------------------------";
extern string __Info03e__ = "ButAtInactiveTimesToCheck";
extern string __Info03f__ = "PastResultsItIsNecessary";
extern string __Info03g__ = "ToSetTheDelayTo: false";
extern string __Info03h__ = "ATTENTION: SetTo >false<";
extern string __Info03i__ = "CanAtTimesProduceMistakes";
extern bool bStartDelay = true; // AtInactiveTimes set it to false: Otherwise it keeps hanging as we have no Tick loop and never comes over StartDelay
extern string _____________1_____________ = "<<< STO SETTINGS >>>";
extern int iKPeriod = 14;
extern int iKSlowing = 3;
Cheers
MJ
DislikedThank you for your reply - How can i for instance call / get the current bar or previous bar value into my ea -
usually for simplicity i use a globalvariableset and get process
or for exe indicators - double trendmtfs = iCustom(NULL,0,"!Ultra Stochastic Color Line"," ",StochTF," ",FastK,SlowK,SlowD," ",MaMode," ",PriceField," ",false," ",2,LightGray,1000," ",0,2);
for example - the issue is making sure i can identify all the paramaters which is not easy.
As i said i would like to identify the current or previous bar value...Ignored
__Thanks__ MJ