MQL4 and MetaTrader 4 - page 270

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)...
[Deleted]
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...
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....
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...
Hi everyone. I am reading through the MQL4 manual step by step just trying to make sure I understand each section as much as possible before moving on. I have some code here taken directly from page (https://book.mql4.com/operators/break) of the manual: int start() //
I have a problem about debug. Could you help me? return value of 'OrderSelect' should be checked MA.1.mq4 111 7return value of 'OrderClose' should be checked MA.1.mq4 131 16return value of 'OrderModify' should be checked MA.1.mq4 141 22return value of 'OrderClose' should...
I test more than 3000 EAs and i never came across something like this. I know EAs can be very different in real world than in backtest because of slippage and spread, most of these are short term trader. But I found a long term swing trader that uses tp and sl, no martingale and is profitable with...
Hi all, I am trying to add a components to my current indicator so that it doesn't return any sequential highs or lows. At the moment, the indicator returns a key high or low based on the 'Get Signal' code, but, I would like to add code which wont allow sequential highs or lows - so if the indicator...
hi i m new to coding world i need help i need some one kind who can guide me a little i m working with loop how i will stop my loop i want to reach to a spacifi candle on which indicator showing arrow i can stop loop to very next candle aftr arrow candle but i can not stop loop after unlimited
Hello all I'm new here this is my first topic, I already find all information about the subject in google so on in forex forum but I didn't find the right one can you all help me? Below is my code I want to make it available to close auto trades like EA in EA not just manual trades. input bool...
Here's what I have come up with so far. I need to get the order which got market executed: 1) Its entry price. 2) Based on entry price, do the 25 points distance. (Entry price of market order which got executed - 25) 3) Execute a SellStop order, with inputs entered (Lot Size, TP, SL)...
I was wondering whether there is a minimal amount of elements a dynamic array must have in order to work. This because I’d written a code which started by making a dynamic array of 10 elements and then it started reducing that number to 1. This did not work though, but when I changed the minimum of...