Hello. There is a SimpleIndicator indicator. It crosses MAs and produces arrows above (below) the corresponding bar. Everything is fine and good. It compiles very well.
I decided to convert it to MACD. I did so: saved it under the name Indicator_MACD and started to correct it. I have saved the result. I opened terminal and tried to attach it to the file. Ok, compiled it and got a lot of errors.
'limit' - initialization expected C:\Program Files\MetaTrader - Alpari\experts\indicators\Indicator_MACD.mq4 (60, 16)
'i' - expression on global scope not allowed (60, 23)
'i' - expression on global scope not allowed (60, 30)
'{' - expression on global scope not allowed (61, 5)
'}' - unbalanced parentheses (71, 3)
I've tried to figure out what's causing it but nothing comes to mind. After all, I only fixed the most important things, I did not touch...... I am attaching the indicator. Help me out here!!!!!!!!!!
The idea is simple. MACD with parameters 13,21,1 crosses 0, MACD with parameters 21,34,1 crosses 0. WHEN these two conditions coincide, an arrow is drawn
igrok2008>>: Попытался понять в чём причина но ничего на ум не приходит. Ведь исправлял только самое самое, основное не трогал...... Индикатор прикрепляю. Помогите кто чем может!!!!!!!!!!
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Друзья, добрый день.
подскажите, пожалуйста, по такому вопросу...
хочется реализовать в индикаторе такую вещь:
если график, на который этот индикатор "прикрепили", является графиком EURUSD, то нужно вывести одно сообщение.
если это график GBPUSD, то выводим другое сообщение.
Какой командой в MQL4 мы проверяем, на графике какой валютной пары "мы сейчас находимся"?
Заранее большое спасибо.
подкажите пжл. как прописать в коде чтобы OderOpenPrice() бралась с последнего открытого ордера.
или у кого завалялся такой простой советник- при подьеме цены на x пунктов от посл ордера op_buy при понижении op_sell.
просто пытался программу напис, но чето не посилам даж такую простую)))))
1) when opening this first order, write its OrderOpenPrice in a global variable, or
2) through a search of the currently open orders
'limit' - initialization expected C:\Program Files\MetaTrader - Alpari\experts\indicators\Indicator_MACD.mq4 (60, 16) 'i' - expression on global scope not allowed (60, 23) 'i' - expression on global scope not allowed (60, 30) '{' - expression on global scope not allowed (61, 5) '}' - unbalanced parentheses (71, 3)Попытался понять в чём причина но ничего на ум не приходит. Ведь исправлял только самое самое, основное не трогал...... Индикатор прикрепляю. Помогите кто чем может!!!!!!!!!!
limit = Bars-MathMax(pF1,pS1}Alternatively, you can specify that OderOpenPrice() is taken from the last opened order
int i=OrdersTotal();
OrderSelect(i,SELECT_BY_POS);
double price=OrderOpenPrice();
doesn't seem to work
Or you can write OderOpenPrice() to be taken from the last open order
int i=OrdersTotal();
OrderSelect(i,SELECT_BY_POS);
double price=OrderOpenPrice();
Doesn't seem to work
Try this
int i=OrdersTotal();
OrderSelect(i-1,SELECT_BY_POS);
double price=OrderOpenPrice();