iCustom question

 

Many indicators have multiple outputs, like Stochastic and Alligator. How do you tell to iCustom which one you want? If you can't specify which you want, which do you get by default? Thanks in advance....

 
Bill R:
Many indicators have multiple outputs, like Stochastic and Alligator. How do you tell to iCustom which one you want? If you can't specify which you want, which do you get by default? Thanks in advance....

Stochastic and Alligator (your examples) don't use iCustom() function. They are standard indicators.

iAlligator(NULL, 0, 13, 8, 8, 5, 5, 3, MODE_SMMA, PRICE_MEDIAN, MODE_GATORJAW, 1);symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.timeframe - Timeframe. It can be one of Timeframe enumeration values. 0 means the current chart timeframe.jaw_period - Blue line averaging period (Alligator's Jaw).jaw_shift - Blue line shift relative to the chart.teeth_period - Red line averaging period (Alligator's Teeth).teeth_shift - Red line shift relative to the chart.lips_period - Green line averaging period (Alligator's Lips).lips_shift - Green line shift relative to the chart.ma_method - MA method. It can be any of Moving Average methods. applied_price - Applied price. It can be any of Applied price enumeration values.mode - Data source, identifier of a line of the indicator. It can be any of the following values:MODE_GATORJAW - Gator Jaw (blue) balance line,MODE_GATORTEETH - Gator Teeth (red) balance line,MODE_GATORLIPS - Gator Lips (green) balance line.shift - Shift relative to the current bar (number of periods back) where the data should be taken from.
iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0)symbol - Symbol the data of which should be used to calculate indicator. NULL means the current symbol.timeframe - Timeframe. It can be any of Timeframe enumeration values. 0 means the current chart timeframe.%Kperiod - %K line period.%Dperiod - %D line period.slowing - Slowing value.method - MA method. It can be any ofMoving Average method enumeration value.price_field - Price field parameter. Can be one of this values: 0 - Low/High or 1 - Close/Close.mode - Indicator line index. It can be any of the Indicators line identifiers enumeration value.shift - Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago).

These are only examples. Take a look in the MetaEditor (dictionnaire tab and technical indicators).

Hope that helps.

FerruFx

 

I uploaded the source so you can see how to work with iCustom.

Having the actual code should make it easier than reading the copy/pasted manual.

To answer you question, MODE is the variable that tells the indicator called by iCustom what output buffer data to return.

MODE = 0, is the first buffer.

MODE = 7, is the last buffer.

I hope that helps.

Files:
Reason: