Topic: modify donch channels

i tried to modify donch channels to work with volume so i need only one line instead-of two  but after modification i find these errors

ERROR: Indicator compilation failed in file [DonchVolume.cs]
     Line 237 Column 25: No overload for method 'BandIndicatorLogic' takes '6' arguments.
     Line 242 Column 25: No overload for method 'BandIndicatorLogic' takes '6' arguments.
     Line 247 Column 25: No overload for method 'BandIndicatorLogic' takes '6' arguments.
     Line 252 Column 25: No overload for method 'BandIndicatorLogic' takes '6' arguments.
     Line 279 Column 25: No overload for method 'BandIndicatorLogic' takes '6' arguments.

Post's attachments

DonchVolume.cs 16.06 kb, 8 downloads since 2013-06-29 

You don't have the permssions to download the attachments of this post.

Re: modify donch channels

Why post in my indi corner? Not my indi! Please remember to make a separate thread!

About your errors, you can't just delete a member of a logic method, therefore substitute it with a zero:
instead of this

BandIndicatorLogic(iFirstBar, iPrvs, adUpBand,  ref Component[2], ref Component[3],
                                           BandIndLogic.The_bar_opens_below_the_Upper_Band);

make it like this

BandIndicatorLogic(iFirstBar, iPrvs, adUpBand, 0, ref Component[2], ref Component[3],
                                           BandIndLogic.The_bar_opens_below_the_Upper_Band);

Re: modify donch channels

sorry if that annoying you but i like to make most of indicators in one place to make it easy for all to find and participate

Re: modify donch channels

i changed the empty space to 0  but


Line 237 Column 25: The best overloaded method match for 'ForexStrategyBuilder.Indicators.Indicator.BandIndicatorLogic(int, int, double[], double[], ref ForexStrategyBuilder.Indicators.IndicatorComp, ref ForexStrategyBuilder.Indicators.IndicatorComp, ForexStrategyBuilder.BandIndLogic)' has some invalid arguments.
     Line 237 Column 72: Argument '4': cannot convert from 'int' to 'double[]'.
 

and why bandlogic needs 6 arguments !!!!


Thanks

Re: modify donch channels

post the code

Re: modify donch channels

footon wrote:

post the code

case "The bar opens below Upper Band":
                        BandIndicatorLogic(iFirstBar, iPrvs, adUpBand, 0,  ref Component[2], ref Component[3],
                                           BandIndLogic.The_bar_opens_below_the_Upper_Band);
                        break;

                    case "The bar opens above Upper Band":
                        BandIndicatorLogic(iFirstBar, iPrvs, adUpBand, 0,  ref Component[2], ref Component[3],
                                           BandIndLogic.The_bar_opens_above_the_Upper_Band);
                        break;               

                    case "The bar opens below Upper Band after opening above it":
                        BandIndicatorLogic(iFirstBar, iPrvs, adUpBand, 0,  ref Component[2], ref Component[3],
                                           BandIndLogic.The_bar_opens_below_the_Upper_Band_after_opening_above_it);
                        break;

                    case "The bar opens above Upper Band after opening below it":
                        BandIndicatorLogic(iFirstBar, iPrvs, adUpBand, 0,  ref Component[2], ref Component[3],
                                           BandIndLogic.The_bar_opens_above_the_Upper_Band_after_opening_below_it);
                        break;                   

Re: modify donch channels

try this, declare downband again in the calc block above, then change the logic blocks like below.

double[] adDnBand  = new double[Bars];

BandIndicatorLogic(iFirstBar, iPrvs, adUpBand, adDnBand, ref Component[2], ref Component[3],
                                           BandIndLogic.The_bar_opens_below_the_Upper_Band);