MQL4 and MetaTrader 4 - page 29

To post a new topic, please log in or register
After getting the indicator name to feed in the code below so that I can get the value, I am getting a compile time error. Any idea how to get the value of the indicator "RSI" printed out? Thanks       Print("indicator short name is: " + ChartIndicatorName(0,1,0));   // reported...
How to print last version MQL4 book? Thanks
  MQL4 Workshop (18   1 2)
Hello there, I am new to this forum and I am wondering if any of you would help me make it possible for this topic to become free for all, not profitable, collaborative, and educational. The thing is I got hooked with the automated trading around a year ago, and yes I bought some of them and ended...
I'm developing some tools that requires by default to have a 0 value so the trader can customize them but I'd like to know if there's a way to set on a double value a default message like "Input here the TP value" or something like that?
Hello, I have recently downloaded the app Metatrader 4 and the problem that I have, is that the "QUOTES" page, every day resets and can't keep my markets saved. Every time have to choose the markets again, erase those by default and on and on... Can't really work this way if once or twice per day,...
  Kaufman AMA break out EA (77   1 2 3 4 5 ... 7 8)
First a description of reasons for making this EA (apart from the obvious ones ): _________________________________ Due to coders laziness I guess, or due to ignoring the possible errors in EA execution, EAs with proper code execution error management, order exceptions execution and error...
Hi. I am trying to understand the ordersend function. According to the MQL4 reference documentation, it takes volume as a double e.g. OrderSend(Symbol(),OP_BUY,1.5,price,3,stoploss,takeprofit,"My order",16384,0,clrGreen); where 1.5 is the volume to buy. Some brokers use 1000,10000,100000 size lots....
Hello , 2 indicators are initialized in main chart  by these set of instruction. double ExtMapBuffer1[];                         double ExtMapBuffer2[];                         int init(){      SetIndexStyle(0, DRAW_ARROW, STYLE_DOT, 1);    SetIndexArrow(0, 233);    SetIndexBuffer(0,...
What is the actual reason of "indicator is too slow"? I noticed that adding an artificial delay (10-20 sec) in OnCalculate does not cause the appearance of that "too slow" message, therefore, the reason is not in the long calculation of an indicator.
for(cnt=0;cnt<total;cnt++) compare to (cnt=0;cnt<=total;cnt++)? As I was trying to use CloseAll(), I found that the typical one (first one) providedby CodersGuru didnot manage to close all and one open trade was left unclose. in addition; any different for: OrderSelect(0, SELECT_BY_POS); vs...
Hi A mql4 code changes the chart symbol using the "ChartSetSymbolPeriod" method. And since the chart has an indicator, it takes a second or two to render the indicator onto the sub window. Is there a call back which gets triggered once the indicator finished rendering so that I can do other stuff?...
HI can some one fix this EA its not opening any orders. EA MQL4 Scrip is attached bellow please help me with the code strategies i copied from indicator i want to send buy orders when new signal comes.  I have a equation too in mql4 can i do this? int start()  for(int cnt=0; cnt<OrdersTotal();...
I've got an EA that I am trading on 4 pair. I know by using OrderTotal I can restrict the number of orders opened at a give time, so I have it setup so only 1 order can be opened at a time. How can I set it up so that 1 order can be opened PER PAIR?
  Ocean theory based indicators (580   1 2 3 4 5 ... 57 58)
In this thread Jim Sloman's "Ocean theory" based indicators will be posted. _________________________________________ PS: this thread (as it stands right now) will have about 60 indicators posted here (metatrader 4 + metatrader 5 versions) Metatrader 4 versions are completed, but because I would...
How do I convert Mq4 files into Ex4 files so I can run the Ex4 file as an EA?
I have written an indicator but it is not performing the way it should. The problem is that the indicator does not take into consideration the higher time frame (H1) when posting the BUY and SELL arrows on the lower time frame (M15) chart. If you can fix this we will have a fantastic indicator! Here...
Hello everyone, I am recently trying to predict MACD signals and i think its going well. the problem is that i want to draw it in the indicator window but haven't been successful so far. So consider i can have all the candles needed in order to calculate the iMACD(NULL,0,12,26,9,PRICE_CLOSE...
The code line below is expected to print out 1 since I have the Stochastic indicator attached. but it prints only the text "indicator short name is: " Any idea how to get the short name of the indicator? Print("indicator short name is: " + ChartIndicatorName(0,0,1));
If i resize an array which already contains data, will this erase all data or just add an extra slot? i.e., is ArrayResize({1,1,1},4) = {1,1,1,NULL}?
Hello everybody. I would like to see if you can help me with a problem i've been having. if(existeOrdenSell() == false){   orderSend(...);}if(existeOrdenBuy() == false){   orderSend(...);}bool existeOrdenSell()  {      existeSell = false;      for(int i = 0; i < OrdersTotal(); i++)      {...
Hello, I have a problem with using Global Variables. Thanks for taking a look. The requirement is fairly simple (i think), but for me it is difficult to implement. I have tried myself and hired programmers from around the globe, some have a go at doing it but don't actually code what i need or they...
Hello, I have a few questions about running EA in MT4: If I want to run an EA on many currency pairs, do I have to drag-n-drop it on every chart? Is there a simple way to run it on many pairs even if some of them do not have chart displayed on the terminal?When an EA running on multiple currency...
Hello Everybody, I'm new on MQL4 and I would like to modify the stoploss of and existing order. If my trade go up I would like to modify my stoploss, it should be greather than the open price (in case of buy), in this case OrderModify return me error code 130. Does anyone have a solution to modify...
Hi Firstly, sorry for my bad English. Im trying to make my EA. But im a newbie MT4 code, so it's hard for me. Would you please help me? These are what im trying to to: - It works on many pairs same time - If the Buy (or Sell) condition is right, it will open 1 order per 1 bar (new bar new 1 order) -...
I used TimeCurrent() to get the current server time.. But when used it in the tester, TimeCurrent() becomes the time of the chart time at which the strategy tester is running.. I want a way to get the current time to appear on the tester.. (Tried to get the local time as well, it also equals to...
Hello I hope someone can help me find an "error" in this function. The Problem: I want to calculate the high of the last 31 daily candles if Line4CandleHL == false. The number of days is returned until the point where I put the Print(). If I move it below LineH, LineL the variable LineTFBars does...
Hi Does anybody know, how to find out the brokers Commission rate !!!before!!! a trade have been made on Metatrader 4 (not 5) ? Of course, I know that there is the OrderCommission() API function. But this only works, if there are already existing previous closed orders. However, if there are no...
Hi guys, glad to be apart of the family and looking forward to helping out where i can aswell as being helped haha In need of some help with my trouble. So as it stands, it reads this for example Open: 1.59270 High: 1.59320 Low: 1.59248 Close: 1.59251 Although now i would like to add a few things to...
Hi guys, is it possible to store a value inside a for-loop so that I can use this value for further calculations outside the for-loop?
I don't spend much time in forums so this thread might seem silly but I would liketo know how to find a quality trustworthy programmer. I have not had much luckin this regard so I am assuming there is something I am missing. What type of qualificationsor certification should I be looking for that...