Download MetaTrader 5

MQL4 and MetaTrader 4 - page 119

To post a new topic, please log in or register
Hi,  in order to achieve 450 lots with the less loss possible, i want to create an EA that opens trades with TP and SL of 5 pips with a 0.1 lot, on the EURUSD pair (0.7 pip Spread so the least loss). How is it possible to do it with an EA ? I looked on how to do it but never found how to make it....
Hello, I am able to set the color scheme in the strategy tester by naming a template to the same name as my EA. I am also able to set the background color of the open and close trade arrows using the color parameter in OrderSend() and OrderClose(). 1. How can I change the color of the trend line...
Hi!   Im rather new to coding in the MT4 platform and I have got a very noob question to ask...  I tried to scale some indicators to 0-1 using the normalizer available to download on this site https://www.mql5.com/en/code/8572  , which is apparently a popular tool to achieve what I tried to do.  But...
I would like to save or edit strategy tester report in html file without revealing the parameters. See picture for example. Is it possible?    
Hi everyone, I am an FX trading beginner, I am currently using Metatrader 4 to trade EUR/USD, I was just wondering, what is the opening and closing time for EUR/US What is the opening and closing time for EUR/USD ? Thanks in advance.
  indicator crossing (16   1 2)
Hey Readers! I am going through a problem. I want that when two indicators line crosses each other i should get an Alert. The method i try was that  i get values of both indicators at  candle 1 and check that if the both values i get are equal or not but this method did not work because the...
My tablet updated  MT4 to the 952 build however since this has happened I am no longer able to modify or close trades. The only function that remains operational is the ability to enter a trade but I am not able to set stop loss or take profit targets or even close trades. Is anyone else...
Hi guys!  I wrote some functions to a Library File and when i run the strategy tester error occurred, see the pic below : When i use Include Files it works perfect. But for some reason to work with library seem a better solution for large EA that i work for.  I run win10 64-bit version system...
Hello, im using a demo account of mql4 platform.   I never trades before, so i got no experience. Thats why i got this question, when i try to Comment the spread which is on the market always get the same number and never changes. The expression that i used is: Comment("SPREAD ", Ask-Bid); and...
Any ideas why Mt4 at startup would be removing indis on some charts not others ? For example, 2 lines from the log  2    06:27:44.615    Custom indicator Atr-Bb EURUSD,M5: loaded successfully 2    06:27:44.824    Custom indicator Atr-Bb EURUSD,M5: removed Oddly, in the indis list, a line is left...
New article Graphical Interfaces V: The Combobox Control (Chapter 3) has been published: In the first two chapters of the fifth part of the series, we developed classes for creating a scrollbar and a view list. In this chapter, we will speak about creating a class for the combobox control. This is...
Hi Everyone.  I have tried every bit of advise that I can find on this forum, but none seems to work.  Will someone please help.  I believe the issue lies with my OrderTotal function.  I am trading 10 currency pairs, i.e. I have the EA open on 10 charts.  This is a simple hedging strategy.  I want...
  Trailing candle stoploss (13   1 2)
Hi,   I'm trying to use a candle trailing stoploss. The one for the buy trades seems to work as it should. How ever the sell one keeps giving an order modify 1 error. I have looked this up but I dont understand what the issue is. The buy works so the sell should be the opposite. Well thats my logic...
when I add a template to a chart ,the teminal shut dowan suddently ,and the log record nothing innormal .
Hello everyone. I have a problem with the code, and I need your help. I wrote this code: {         Buffer1[i] = Low[i]- 1 * myPoint;         if(i == 0 && Time[0] != time_alert) { myAlert("indicator", "Buy"); time_alert = Time[0]; }         } The part that I have highlighted, brings up the Popup. I...
Hello everybody. Can i know if i add the index on metatrader? i would like to work with dax (ger30) on this platform 
I am newbee sorry for my english... I am writing a code but dont work properly... Please, is you can help me I'll apreciate.   Thanks.  //+------------------------------------------------------------------+ //|                                                      MrmRes2.mq4 | //|...
When I draw or create a line, it uses by default the last used color. How can I set programmatically this color, before I draw/create the line?
// Determine what a pip is.    pips=Point; //.00001 or .0001. .001 .01.    if(Digits==3 || Digits==5)       pips*=10;   I get an invalid lot size error if I enter say 1.63 lot however if I enter 1.6 lot then I do not get an error message. Please note that I am spread betting on fx is there a fix for...
I'm backtesting an EA I have written and I have the following code for handling stop-loss calculation & setting:    bool subTrailingStop (double dTrailingStop) export{    bool   rc           = false;    bool   op           = false;    int    iTypeBuySell = OrderType();    double price        =...
I have a few accounts with different brokers. Is there a way to copy or send my orders to all of them in one go, to avoid jumping between MT terminals ? I know about Signals but not sure if I can subscribe to my our signal and I need to pay fee, VPS etc   Can I get access via mql from terminal...
Looking down the Indicators column I cannot see Zig Zag despite being assured by somebody that it is there. As I am not stupid and do know that 'z' is at the end of the alphabet, and therefore should be at the bottom of the column - it is not there. Where is it?
Dear all, I would like to know if there's a function that allow my EA to increase (only increase) the number of lots of my open trade. Could someone help me, please? Thank you in advance.
My idea is make a some pause in EA after close order - but no Sleep. It is section in line 38-57 in the atached file.   It work  well  in demo - but in optimalization i Tester   -  NO.  Yet I could not find my mistake - problematic is maybe  instruction while ....   datetime time_Lo,...
Tradeing Trader
Hello, i had find out with the help of a Moderator that in the Strategy Tester the function OnChartEvent() does not work, i wanted to ask if somebody knows a trick or solution how i can get the chart event also in a Strategy backtest.
When I press a key in the testing chart, OnChartEvent() does not display the Print message in the Tester Journal tab for the following simple EA (not an indicator). Any ideas why and how to fix it? void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) {...
hello, I have a problem with my ea, he work good on demo account but not open the trade in live account. I have try to change all ordersend() and ordermodify() orderclose() but I don't know if I need to change another think like the sl or tp in my code first I use: #include <OrderReliable_2010.10...
I am looking for coding to do the following: I have an indicator on a 4hr chart window which when it shows a buy signal an EA on the equivalent 1hr chart will use that signal ( the 4hr one) as one of the conditions to enter a trade. What coding will allow for this? Thanks
Hello, does somebody know a expert advisor that automatically buys when the price is below the lower bollinger band and the RSI is below a certain level and automatically sells when the opposite happens? It should also have the option to choose SL and TL. I couldn't find it   Thank you very much