help with argument New comment bewise 2009.04.18 17:15 if i use a universal EMA setting some thing like this extern double ShortEma = 15; extern double LongEma = 35; extern int TakeProfit=750; extern int TrailingStop=100; extern int StopLoss = 100; extern int MAMode1 = 0; // 0=SMA 1=EMA 2=Smoothed 3=Linear Weighted - EMA rules (usually) on Cable extern int MAMode2 = 0; // 0=SMA 1=EMA 2=Smoothed 3=Linear Weighted - EMA rules (usually) on Cable extern int MAPrice1 = 0; // 0=Close price.1 Open price 2 High price 3 Low price Median price, (high+low)/2. // 5 Typical price, (high+low+close)/3. 6 Weighted close price, (high+low+close+close)/4. extern int MAPrice2 = 0; // 0=Close price.1 Open price 2 High price 3 Low price Median price, (high+low)/2. // 5 Typical price, (high+low+close)/3. 6 Weighted close price, (high+low+close+close)/4. and use and argument like this if(Volume[0]>1) return; //---- get Moving Average Ema=iMA(NULL,0,ShortEma,LongEma,MAMode1,MAMode2,MAPrice1,MAPrice2); double SEMA1=iMA(NULL,0,ShortEma,0,MAMode1,MAPrice1,1); double LEMA1=iMA(NULL,0,LongEma,0,MAMode2,MAPrice2,1); double SEMA2=iMA(NULL,0,ShortEma,0,MAMode1,MAPrice1,2); double LEMA2=iMA(NULL,0,LongEma,0,MAMode2,MAPrice2,2); //---- sell conditions // if(Open[1]>Ema && Close[1]<Ema) if (SEMA1<LEMA1 && SEMA2>LEMA2) it gives me errors i try to have and ema with say open price and set the second ma on sma on a close price but want to have it as a setting where i can change just the values it gives me error wrong parameter count help fineturn EA help with tralling stop Slope of an EMA Iggy 2009.04.18 22:59 #1 Ema has 8 parameters but iMA accepts only 7. bewise 2009.04.19 07:29 #2 irusoh1: Ema has 8 parameters but iMA accepts only 7. so i must remove one of them in the maprice or mamode New comment
if i use a universal EMA setting
some thing like this
extern double ShortEma = 15;
extern double LongEma = 35;
extern int TakeProfit=750;
extern int TrailingStop=100;
extern int StopLoss = 100;
extern int MAMode1 = 0; // 0=SMA 1=EMA 2=Smoothed 3=Linear Weighted - EMA rules (usually) on Cable
extern int MAMode2 = 0; // 0=SMA 1=EMA 2=Smoothed 3=Linear Weighted - EMA rules (usually) on Cable
extern int MAPrice1 = 0; // 0=Close price.1 Open price 2 High price 3 Low price Median price, (high+low)/2.
// 5 Typical price, (high+low+close)/3. 6 Weighted close price, (high+low+close+close)/4.
extern int MAPrice2 = 0; // 0=Close price.1 Open price 2 High price 3 Low price Median price, (high+low)/2.
// 5 Typical price, (high+low+close)/3. 6 Weighted close price, (high+low+close+close)/4.
and
use and argument like this
if(Volume[0]>1) return;//---- get Moving Average
Ema=iMA(NULL,0,ShortEma,LongEma,MAMode1,MAMode2,MAPrice1,MAPrice2);
double SEMA1=iMA(NULL,0,ShortEma,0,MAMode1,MAPrice1,1);
double LEMA1=iMA(NULL,0,LongEma,0,MAMode2,MAPrice2,1);
double SEMA2=iMA(NULL,0,ShortEma,0,MAMode1,MAPrice1,2);
double LEMA2=iMA(NULL,0,LongEma,0,MAMode2,MAPrice2,2);
//---- sell conditions
// if(Open[1]>Ema && Close[1]<Ema)
if (SEMA1<LEMA1 && SEMA2>LEMA2)
it gives me errors
i try to have and ema with say open price
and set the second ma on sma on a close price but want to have it as a setting where i can change just the values
it gives me error wrong parameter count