Download MetaTrader 5

MQL4 and MetaTrader 4 - page 135

To post a new topic, please log in or register
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 
Hi, Trying to add text to on the bar when criteria met and buy order processed. On the first order it is adding Sample Text on the chart, but for further order not adding. So text is added only one and first order. I want to display text for each time that buy order opened. Orders opening without...
Hey,  i know there is no way for moving the CHARTS with MQL4, but is there a way with the (Win)User32.dll ?   I want to MOVE the Chart to a specific Position, eg. x = 0, y = 500; and RESIZE the Chart to x_size = 350, y_size = 500;    Has someone a sample_code that is working in MQL4 ?    PLEASE!-)...
I'd like advice.... I'm experiencing Trade Context is Busy errors, very occasionally ...(but always unwelcome) when Closing Multiple Orders. I've tried Sleep(XXXX) but this has two problems.. First) It wastes time when there is nothing wrong.. Two) It doesn't always cure Trade Context Busy errors....
Can I somehow call ObjectGet() giving it a specific chartId? The documentation does not specify that this is possible. I want to get some properties, like OBJPROP_TIME1 and OBJPROP_COLOR from another chart than the currently active one.
Hello guys, I wonder, how would you solve this issue with MA crossing strategy when two MAs are basically laying on the same line and crossing each other alternatively? My expert advisor is making profit (in tester of course) but this is a very bad drawback that I have to solve and I'm not sure what...
hi  guy  how is possible , know  if  a  opened trade  is  in buy or sell ??? thankz  at  all
  Chart Axis Fonts (20   1 2)
Hi, How can the x & y axis font sizes be changed? The default font size is too small. The other charting programs I use have options to easliy change them, but I can't find anything in the help section that addresses this. Thanks for your help, Geoff
Hey all,  I have been using LOCLinePips.mq4 which basically displays the distance in pips from price to HLINE. I want to modify it to only calculate from solid horizontal lines only is this possible? I guess i will have to change this part of the code    void DoJob(){    int...
guys,   need help. im using pallada system and i got this error caused by:   1. i load all the system on sunday morning everything is fine. 2. and at night after i open the mt4 all loaded and fine, and i removed some of the indi because i want to use the other new. 3. and after i load it again, i...
  New Trader Need Help (11   1 2)
Hi everyone,                           New to trading - looking for some good techniques on when to enter my trades.   Can anybody here pointme in a good direction?   Thanks!  
Hello,  I started trading since one year ago I basically used to trade manually then I started learning mql about 3 months ago Im literally weak at programming but good in strategies,  after struggling i could make this simple ea it gave me some good results, I thought to add a simple martingale on...
hi  guy i    ,  want in my ea  control in real time a price  of  most  trade  ,  thinked , i will do with a inifnite loop , i tryed  infinite loop +  simply print price , but   MT4 ,  go little  bit  in busy , some one  have  alternative idea  for  do that  ??? thankz
hi guy  i  notice  , my  broker  have 5  digit  before  dot  (example  bid or Ask  price 1.25636) ,  but  when i use marketinfo()  MarketInfo(OrderSymbol(),MODE_ASK)   return me only  4  digit ,  why ???? is possible required 5  digit  at  function ???  , exist some option or  trick  for have ???...
hello everyone, I have inserted a "Doji" candle filter to previous arrow signal. The body of the candle must be above 0.3 pips and it works, but sometimes it happens that in the historic this filter does not work. I've been wrong a few line of code? It could be the "for" loop to bother to filter...
Hi Is there anyway that meta trader sends open and close info email notification from a running SIGNAL ?
Hello i got the next code:       OrderSelect(0,SELECT_BY_POS,MODE_TRADES);                 int Ticket = OrderTicket();             Comment("Beneficios ", Beneficios);      OrderClose(Ticket,NContratos,Bid,10,clrYellow); for trying to close an existing order, the code belongs to a function which is...