i am a newbie to mt4 but i willing to learn, i read some books online and learn this function crossed(), like iscrossed = crossed(shortma, longma); etc. but i want to get to know deeper about this function where does it locate at, I just cant find it anywhere in the documentation, when i type that does it open an order when shortma cross above longma and can i add more like iscrossed = crossed(firstma, sencondma, thridma, etc); ?
- [ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3.
- CROSS EAs
- MA cross/Price cross MA EA
ddock wrote >>
hi rosh, do you mean there no such function as crossed() and i just write that up or the book just made that up ? if that is true, can you show me how to check when 2 lines cross each other. What does the mt4 language using by the way ? ( c++, c#, vb, java, .net)
hi rosh, do you mean there no such function as crossed() and i just write that up or the book just made that up ? if that is true, can you show me how to check when 2 lines cross each other. What does the mt4 language using by the way ? ( c++, c#, vb, java, .net)
int crossed(){ .... current_ma_short = iMA(NULL,0,5,0,MODE_SMA,PRICE_CLOSE,0); current_ma_long = iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,0); previous_ma_short = iMA(NULL,0,5,0,MODE_SMA,PRICE_CLOSE,1); previous_ma_long = iMA(NULL,0,14,0,MODE_SMA,PRICE_CLOSE,1); if (previous_ma_short > previous_ma_long && current_ma_short < current_ma_long) return (CROSS_DOWN); if (previous_ma_short < previous_ma_long && current_ma_short > current_ma_long) return (CROSS_UP); .... }simple code for checking two ma crossed. Have fun.
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