MQL4 and MetaTrader 4 - page 1142

[Deleted]
Does any 1 know how i can conduct a 1:1 leverage; i.e. dont want to use leverage? Adham
[Deleted]
What do you think, is it possible to react to the flows with the help of average currency pair analysis, using, say, gold in comparison, what reactions in the market have you noticed in the flows, say, is it possible to identify the movement in one direction or another of a particular currency pair
Hi guys, Just trying to build a doji detector for Heiken Ashi using iCustom. bool check_for_heiken_doji() { double HAHigh = NormalizeDouble(iCustom(NULL,0,"Heiken Ashi", 0, 0), Digits); double HALow = NormalizeDouble(iCustom(NULL,0,"Heiken Ashi", 1, 0), Digits); double HAOpen =...
how can i use different time period charts in a code? Ex: I want to test M1,M5,M15,M30 in one code, how can i do that? Thanks
I hope someone can help. I am automating functional operation test of EAs after version updates from a command line and using set files. (see Help>Help topics>Tools> configurations at start up) I am running a windows 7 power shell command (not as administrator) where I set the start and end dates...
[Deleted]
.. when i set max slippage to 0? int ticket;double iAsk = Ask;     ticket=OrderSend(Symbol(),OP_BUY,1,iAsk,0,0,0,""+iAsk,0,0,Green);     if(ticket<0)       {        Print("OrderSend failed with error #",GetLastError());        return(0);       }     This code will put the iAsk (thus Ask price) in...
Hello to All, Here I am with a code that works fine, but it is not closing properly. The closing strategy started with an idea for all positions to close if the price reached, 1*iATR, a signal for a profitable close. And if the price moved agaisnt the trade by, 2*iATR, a signal for a StopLoss. As I...
I want to open say 4 or 5 buy/sell trades at different price for the same pair and then use trailing stop to close them. Currently, my EA close the trades at different trailing price, but, I need all the open trades to be closed at the same trailing stop price of my first opened trade. For example,...
[Deleted]
I am working on a custom indicator in MT4. I have pseudocode written for my indicator, but the problem is I need it to take price data from several currency pairs and compile them in the same indicator window. Is this technically possible with MT4? Or is a given indicator only able to accept price...
  indicator file  (2)
How do I convert an EX4 file to an mq4 file so that I can read the code?
  The absurdity of a stop loss  (276   1 2 3 4 5 ... 27 28)
No, really, it's a desire to close a position at a loss ZS: by placing a stop we are not limiting our losses, we are specifying the price at which we are willing to close the position at a loss
[Deleted]
extern double BaseLot = 0.1;extern int StopLoss = 50;extern int TakeProfit = 50;extern double MagicBUY = 12345;extern double MagicSELL = 54321;double ManualMultiply=1;int Every_day_open = -1; //int Every_day_close = -1; //???????int start(){           every_day_open();    every_day_close();    }void...
[Deleted]
void OpenLong(double Price){ RefreshRates();  if(MarketInfo(Symbol(),MODE_ASK)<=Price){  OrderSend(Symbol(), OP_BUY, 0.10, MarketInfo(Symbol(),MODE_ASK), 0, 0, 0, "", 0, 0, Blue);}  return(0);  } This is the code which i want to use to open a long, with restriction that the orderopenprice can be up...
  Takeprofit value  (4)
Hi, maybe simple question but: i'm opennig ticket with: ticketId = OpenTicket(symbol, isBuy, Lots, StopLossPips, TakeProfitPips); how can I get StopLossPips, TakeProfitPips prize from running trade?
  Problems checking for open trade  (76   1 2 3 4 5 ... 7 8)
Hey there I have added this to my code to check if there is an open trade already. The problem is the code will execute one trade and that's it. Can anybody see a problem with this code. I am not a super expert with programing // Check for open trades for(int cnt=OrdersTotal()-1;cnt>=0;cnt--) {
Title says it all. This is what I am using, but I seem to be running into issues with brokers who minimum trail is 0.00003 rather than 0.00030. if (TrailingStop < (MarketInfo(Symbol(),MODE_STOPLEVEL)/ broker_digits + MarketInfo(Symbol(), MODE_SPREAD)/ broker_digits +1)){ //checks if trail is <...
dose any one have the indicator that will write the difference between open & close on every candle on chart ?
I was wondering if someone knows exactly what is the meaning behind the Value of Trade Operations : e.g. https://docs.mql4.com/constants/trading Does it mean that operations with lower value has higher priority during the execution of the program ? or something else ?
What are the limitations with MT4's Expert Advisers? Can you create an EA that trades a 5 minute chart of the EUR/USD based upon custom indicators or scripts from a 1 hour chart of the EUR/GBP?
[Deleted]
Hi guys. I want ask for help. I have indicator that alert me always on every candle when ADX main line is aiming up. Problem is that I want only alert on the first candle when this ADX is stating aiming up. I don't need it every candle because it is very annoying. Can anybody help me what I must add...
[Deleted]
Hello All! As I mentioned in my previous posts, im a total newbie, and my questions might seem stupid for some of you, but could you please explain me, if there is any way to modify take profit & stop loss levels according to the daily range of a currency(maybe using average true range, or average...
The Topic about says it: How can I get an EA to close the chart it is on after the last trade on it closes ? Thanks for any and all assistance.
  Lot size calculation  (22   1 2 3)
Hi there, I'm trying to figure something out but ... I'll try to explain. I have $50000 account and I prefer to risk on every trade 3% of it. This is $1500. The standard lot normally yields $10 for 1 pip. Right ? So divide 1500 by 10 means I have 150 pips price channel for the market which I can...
Hi, I can't understand, what I am doing wrong! First I send an order without TP and SL. After that I use this function: void Order_modify()  {   double spread = Ask-Bid;      for(int i=0;i<=OrdersTotal();i++)     {      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;      if(OrderSymbol()...
[Deleted]
Hello, I just built my first EA, and I tried to test it in the strategy tester. Data is complete, other EA work on the same properties on GBPJPY nad GBPUSD, so I dont understand why isnt my EA working? It turns out that the EA did not open any trades on these pairs, where as it does work correctly...
[Deleted]
This happens to me occasionally and I can't figure out why. I've searched throughout the forum and tried numerous changes for the last hour and can't figure it out: I keep getting a "Open_Short - variable not defined" error...whereas my Open_Long variable works perfectly. Obviously they're both...
I have been backtesting my EA with a GMT shift of +2 as Alpari is currently GMT+2 In the winter they will change to GMT+1. Would I need to change the GMT shift to +1 then, or keep it as it is? I am confused as to if the results when backtesting during GMT+1 time would be the same as testing now with...
[Deleted]
Hello, I am a newbie on MT4, but a client requires development with MT4 API. Is there a way to run a free demo and unlimited version. This would be to build a Development environment, not commercial version of course. Many Thanks
  CPU Efficiency  (5)
From the point of view of computer efficiency and resources, if I want to find the maximum of 3 real numbers, Val1, Val2 and Val3, should I use two sets of IF statements: if( Val1 > Val2) { if( Val1 > Val3) Maximum = Val1; else Maximum = Val3; } else if( Val2 > Val3) Maximum = Val2; else Maximum =...
On Saturday, May 13, the new build 402 of the MetaTrader 4 will be released: Fixed timezone correction when downloading history data to History Center. Fixed freezing of mobile terminals during startup and LiveUpdate on the HTC devices.Fixed bugs reported in error messages.The live update will be...