I am trying to update some old EA code. can someone help (see below)

 

improper enumerator cannot be used

double ism0=iStochastic(Symbol(),Open_Red_Blue_TimeFrame,Stochastic_K,Stochastic_D,Stochastic_Slowing,MODE_SMA,PRICE_CLOSE,MODE_MAIN,Open_Red_Blue_Trade_Bar);
 
marktrounce27 :

improper enumerator cannot be used

Are you asking about MQL4 or MQL5?

 
Vladimir Karputov:

Are you asking about MQL4 or MQL5?

mql4

 
Vladimir Karputov:

Are you asking about MQL4 or MQL5?

i am getting warning message relating to ( (bracket) before the word symbol and last bracket. any ideas
 
  1. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum?
    Next time, post in the correct place. The moderators will likely move this thread there soon.

  2. Look at or post the code above that line. That is where your error is.

  3. Your code
    Documentation
    double ism0=iStochastic(
       Symbol(),
       Open_Red_Blue_TimeFrame,
       Stochastic_K,
       Stochastic_D,
       Stochastic_Slowing,
       MODE_SMA,
       PRICE_CLOSE,
       MODE_MAIN,
       Open_Red_Blue_Trade_Bar
    );
    double  iStochastic(
       string symbol,      // symbol
       int    timeframe,   // timeframe
       int    Kperiod,     // K line period
       int    Dperiod,     // D line period
       int    slowing,     // slowing
       int    method,      // averaging method
       int    price_field, // price (Low/High or Close/Close)
       int    mode,        // line index
       int    shift        // shift
       );

    price_field [in]  Price field parameter. Can be one of this values: 0 - Low/High or 1 - Close/Close.

  4. The price field is either a zero or a one. It is not a Price Constants

 
William Roeder:
  1. Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum?
    Next time, post in the correct place. The moderators will likely move this thread there soon.

  2. Look at or post the code above that line. That is where your error is.

  3. Your code
    Documentation
  4. The price field is either a zero or a one. It is not a Price Constants

thanks William,  I will remember next time.

 
marktrounce27 :

mql4

All questions about the old terminal are discussed in a special section: MQL4 and MetaTrader 4

I will move your topic to this section.

 
Vladimir Karputov:

All questions about the old terminal are discussed in a special section: MQL4 and MetaTrader 4

I will move your topic to this section.

thanks