MQL4 and MetaTrader 4 - page 34

To post a new topic, please log in or register
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...
How can I undo creating an object (HL, VL, Trendline) after pressing a button to create it? (not by calling ObjectCreate, so I do not have the object name) My current thoughts and questions: There is a menu "Charts->Objects->Delete Last", but it has no effect after a) I draw a HL and chose it or b)...
mar5
Hey guys, in the docs I didn''t find how to delete a fibo level after creating an OBJ_FIBO. I don't need the 23.6 level and so I want to delete it from my chart. Is that somehow possible?
Forgive my ignorance here, but where would I need to post a development request for an update to the Metatrader Software to include an option to add a selected template to all open charts? Hope someone can help.
Hey guys, Here's my script below, mostly it works as per inputs, but sometimes there's difference in TP, SL, and Distance. I mean, is there a way to make it 'recheck' for inputs and trades for their TP, SL and distance? //+------------------------------------------------------------------+#property...
Hi everyone! I am new to making EA but not new to trading. I currently have an EA that buys when the price closes over my MA, with a 50pip TP and a 30pip SL, and vice versa. But my problem is that it opens positions EVERY TIME a candle closes in those conditions. Which can be very inconvenient. If...
Hello  I meet  problem with  indice of TimeHour() When the indice is a constant  like : int t = TimeHour(Time[2]);  Comment(t); TimeHour of indice 2 is properly displayed. -------------------------------------------------------------------------------------------------------------------------------+...
Hello, I have a problem with loading all the data from account history. The problem is, that Terminal doesn't shows all historical data, only from January 2017 and 2016 is archived. I thought it was broker's problem and I send them email and I received an answer: Unfortunately we do not store any...
Hi friends, I'm going to backtest my EA and converted one of my symbol's tickdata into .hst and .fxt and did a test to see how well it is working and I found out that my .hst and .fxt files are saved on the Data folder where is located in a different directory than the installation folder. I...
I can use ObjectGetValueByShift() to get the values of the channel's main line. But how do I get values of the second line? Is it possible at all? Calculating using linear equation formula based on time yields incorrect results due to non-linear time change in the chart.
  Well working Trading System ! (755   1 2 3 4 5 ... 75 76)
Hello Guy´s, I,ve been trading now near 4 years and live good from this job, but ever search a better strategy, system, expert or signal provider... Now i have found one realy very good guy who sells his indicators and system. look at www.tradecurrency.ca The trading system means not that it...
This Thread Already Answer It
This code is straight from page (https://book.mql4.com/operators/switch) of the manual. int start()                                     // Special function 'start'  {   double Level=1.3200;                           // Preset price level   int Delta=NormalizeDouble((Bid-Level)Point,0); // Excess...
Hi I expected to get a different integer for different colors in order to be able to change the color of a label from green to gray but only if it is currently green. the code below is returning the same integer regardless of the the color. Why? and how to go about it? Thanks string lAlert =...
I have some problems with understanding iMAOnArray for MQL4. Below isscript's code, where I am trying to compare results between iMa and iMAOnArray.In my opinion, if I prepare array with prices and use iMAOnArray on the basisof this array, the result must be the same as I just use iMA. Probably...
Hi, I want to know current profit for each chart. I set 2 EA in each chart. USDJPY EA1 and current profit $12 GBPUSD EA2 and current profit -8$ ======================================== In this case, Account profit() =$12+(-$8) =$4. (total) but I want to know each chart profit separately not total....
Hello, I am trying to write an indicator to draw vertical line every spesific date on each month, example: draw vertical line every date: 14 January, 14 February, 14 March, 14 April etc... Something like this: extern string hour = "22";extern int width = 2;extern color Color = FireBrick;int start(){...
Hi, does anyone have read these books? someone could help me to find similar book or better?? Thanks!!!
Hi, I'm trying to create a custom indicator that calculates the lowest highs and highest lows over a certain period and shows it on the chart as a line. It's based on an arrow indicator I've created myself that shows dots as support and resistance until a new high/low is formed. (you can replace it...