You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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