MQL4 and MetaTrader 4 - page 451

i need Send only 1 order code int OrderInOneDay(int type) {    int Cnt=0;       int  totalHistory;          for (int i = OrdersHistoryTotal()-1; i >=0; i--)           {             totalHistory=OrderSelect( i, SELECT_BY_POS, MODE_HISTORY );             if (OrderSymbol() == Symbol() &&...
  Code mql4  (3)
Hi, I would need to add a line of code to the "pip value and spread" indicator which allows me to display the size to be used as a lever 1. Example: Cross to trade: AUDCAD Current pip value: € 6.72 Balance Account € 140,000 Lever I want to use: 1 Therefore .... Position Size: Lots 2.08 The operation...
Hi there, I've been working on my first EA over the last few months and it's now working well :) As is inevitable, I'd like to add some ways of interacting with the EA that is not really covered by the properties dialogue. These would be inputs to enable semi-automated trading. I've spent quite a...
I have an indicator loaded on 13 assets, each tick processes a series of data in D1, H4 and M30. In 10 MT4 the behavior is the same but a MT4 inside VPS did not perform a certain passage. Is it possible that with all these assets the memory of the MT4 fills up generating a block "momentarily even 30...
Hi, Under my EA the order failed to open saying in log "Invalid S/L or T/P" while SL and TP are set to NULL, it happened in very volatile market and spreads were widened at that moment. 1 12:01:09.942 '11111': order sell stop 1.20 GBPUSDmicro opening at 1.32476 sl: 0.00000 tp: 0.00000 failed...
  Closed Orders  (4)
Hello - I'm new to the MT4 platform. I had some pending orders that I thought were at a really good price; The price continued to fall and my orders were all closed (due to my margin). Since then (about an hour ago) the price has gone back up and I would now already be well above the 25% threshold...
Hi, guys! So I have this very interesting problem and dunno how to actually overcome it. Idea is this: someone buys EA that requires 3rd party integration (via WebRequests). Let's say I own this required 3rd party web service and I need somehow to protect my service to only allow web requests from...
Hi I amlearning how to program expert advisors. So far, it worked quite well. Last week,I started to create programs including orders. First Iwanted to test my program in the strategy tester which is included in MT4. Icould place Buy orders including SL and TP which worked fine. But the programalso...
Hey everyone, can someone please guide me on how to put this indicator in ea. //+------------------------------------------------------------------+ //|                                                   AMA&AMAsig.mq4 |...
i want to open buylimit or sellimit orders but at specific time only . example : set buy limit order 1.10001 from 6 am to 9 am only after that cancel the order . please check the code and give me the right code or correct it , please . if((D'6:00:00'<= Time[0]<=D'9:00:00') == true)      {...
Hello everyone, I wrote the code below that, in my mind, should move the endpoint of the trend line to the high of the highest bar, or the low of the lowest bar, but it doesn't. The end of the trend line is moved to the correct level, but not to the right bar, instead it is moved to the most recent...
Hi,  Can someone please send a list of brokers or your broker who uses GMT+0 time server?  Requirements MT4 offered by broker, Server is GMT+0 time I have searched sites that refine the search of brokers based on server time however the data is inaccurate. thanks
Hello, i have a Simple MACD Trend-follow-bot programmed but every Time if he made a Trade, he made it more than once. input bool MACDAktivieren = False;double MACDTakeProfit;double MACDStopLoss;int OffsetHunderterEMA;int TimeframeMACD;int buyticketMACDBuy;int buyticketMACDSell;bool...
Hi Forgive me but I'm new to MQL4 and need to know how you can place a text label on a chart that automatically updates as the price changes . For example, if you had a low time frame price channel on a chart that was changing pretty much constantly, how do you associate a text label with it? A
Hello, i've looked online for this type of indicator but cannot seem to find it anywhere. It's quite simple to code i think, hopefully one of you coders can help me out, i have no idea how to code it. The idea is this: 1. When a candlestick closes within the top or bottom 25 % percent of the...
Hello everyone, is it possible in MQL4 to insert a website inside a object window? void ControlPanel(){   string ControlPaint="Paint",        SecondPaint="Paint1";   if(ObjectFind(0,ControlPaint)<0)      {               ObjectCreate    (0,ControlPaint,OBJ_RECTANGLE_LABEL,0,0...
Is it possible to hide account holder name ( for example display "private"  etc.) on html statement generated by client MT4 terminal. Is there a feature on server side that broker can possibly accommodate such request ? Anybody with this experience
Hi, I hope that there is a moderator from the technical stuff of the Metaquotes who watches the questions and gives correct answer when there is no good answer from the other users. I couldn't find answer to the question described in the subject. With other words: Is there a supported way to open a...
  Take Profit/Stop Loss  (16   1 2)
If I send and open an order with a Take Profit setting and a Stop Loss setting. Is it then guaranteed that these will be adhered to? (assuming that the SL is not closer than the STOPS level of course) A big issue is this - I have noticed that connectivity between my metatrader and the broker...
I am trying to find something similar here in the forum but so far found nothing. My problem is to calculate a Take Profit that allow me to get what I traded so, if I risk US$ 100,00 (converted to the LOT SIZE and taking care of the Margin) on a trade I would like to get the US$ 200,00 in return. I...
I want to use the value of another indicator in my own indicator, but from the indicator window I see that the two lines do not coincide. As you can see from the image above, the dark blue and light blue lines are similar, but not identical. This is my code: #property copyright "Nicola Peluchetti"...
[Deleted]
Hi guys, I made a similar posting a couple of months ago but this one is simplified and right to the point. I have two indicators. One creates a button and if the button is clicked an alert is shown. The second indicator comes into play when a horizontal line is drawn. It just changes the state of...
Hi Can anyone tell me why everytime I test a specific week on mt4 strategy tester and save the results, then I return to the same week ,same pairs, same ea the results are never the same but yet they should be as they are supposed to be genuine results in the past, this is so annoying, how will we...
Hello Everyone, I believe I have basic understanding of Trailing order's and how does it work but there is still one gap in my understanding and would like to fill it with my question. Kindly note: my question belongs to each and every financial instrument as well as each and every, out of hundreds,...
  Last Order  (3)
Hello, i will check, if i have open an order at the actual bar. My idea is, just ask OrderOpentime() and Time[0] with an Order Select    RefreshRates();      bool setOrder = false;      for(int j=0;j<OrdersTotal();j++)        {         Ticket=OrderSelect(j,SELECT_BY_POS,MODE_TRADES);...
Hey there, I have a strange problem in my MT4.. I connected my terminal with myfxbook via FTP publishing. Myfxbook recognized my Terminal and the connection is working. It work's, but only when i go to Tools -> Settings -> FTP -> and click on "Test"  then it uploads data (in Journal i see position...
[Deleted]
Hi coders, I made two scipts. One changes the timeframe of all open charts to the timeframe where the script is dragged to. The other script changes the template of all open charts to a template named "test". Both work fine. But now I added one chart which should not be affected by the scripts. Now...
Hey everyone, am trying to learn the language of MQL4 (I'll get to MQL5 later) have an issue with one of the programs in the book. https://book.mql4.com/programm/samples the program possible.mq4 has a floating-point type "double" in it. But when running it, it only gives 4 digits after the dot,...
Hello mql 4, Is Macd 2009-2014 available for live account? Or is this expired 2014 for live,,,,,,,,,,,, and only for demo available? regards balduin
What are the top 3 Development Languages or Frameworks to start a solid MQL coding career? Is it C++, Python, or what? what are the Top 3