MQL4 and MetaTrader 4 - page 457

  OrderProfit  (3)
Hi Couple of simple questions: 1) Is order profit always in the account currency ? 2) To calculate actual (net) profit = OrderProfit() + OrderCommission() + OrderSwap() ? THANKS Paul
Hi, Any one can give an example in how to search for different conditions in two time frame at once for example: I want to be alert IF: 1) SAM (10,20) Crossover in H1 Timeframe. 2) Price above SMA 50 In H4 Timeframe. Any suggestion or advice will be highly appreciated
Hi, I'm trying to cycle through all the symbols that are available in MT4. Not just the symbols that are currently displayed in MarketWatch. I use the following (abridged) code: int numSymbols=SymbolsTotal(false); string symbol=SymbolName(PositionIndex,false); double price=MarketInfo(symbol...
Hello everyone, I have been doing some research on  Ichimoko Kinko Hyo trending system. https://www.forexfactory.com/attachment.php/1141519?attachmentid=1141519&d...  Now I am trying to code it so that it will advise me of which way the trend is going. I started this code below My variables...
Hi guys, I've been working on an EA that is supposed to move all positions stop losses to entry, if the last order hit take profit. The EA is restricted to 3 positions. The code below that I've written moves the first position stop loss to entry, but doesn't affect any of the other positions, and I...
Can anybody help me create a Buy Limit/Sell Limit script based on MA and using a hotkey? Such that when price (candle) close above the MA, I will press the hotkey and a pending order (buy limit) is triggered on the MA price. Also, when price (candle) close below the MA and I press the hotkey a...
When I go to backtest a strategy I get errors in the journal. 2017.11.29 00:28:55.856 TestGenerator: unmatched data error (volume limit 1444 at 2017.11.20 01:00 exceeded) Everything I am finding is outdated and does not work. I tried using the period converter script, but when I go to open the chart...
[Deleted]
mql4 For example, 5 minutes have passed after the order was opened, and this order should close. The code is too cumbersome to memorize the ticket to close and the opening time to calculate the minutes for each order separately. There may be 1,2,3-10 positions, buy and sell at the same time. Can you
extern int setdayofweek = 0;extern int sethour = 12;extern int lookback_hour = 1;extern double buy_points_buffer = 7.0;extern double sell_points_buffer = 10.0;extern double lots = .3; extern double take_profit_points = 10.0; int ticket = 0;int buy_enable_trade = 1;int sell_enable_trade = 1;int...
  MT4 bug report  (12   1 2)
HI, MT4 version is 4.0.0 B509. I've figured it out, this is a bug: if you move mouse and hover on a S/L line in chart, there should be a small popup showing "drag to modify... xxx $ loss....". But if there is any SEPARATE WINDOW indicator, this popup will never show up when mouse hovering there....
extern int setdayofweek = 0;extern int sethour = 12;extern int lookback_hour = 1;extern double buy_points_buffer = 7.0;extern double sell_points_buffer = 10.0;extern double lots = .3; extern double stop_loss_points = 10.0;extern double take_profit_points = 10.0; int ticket = 0;int buy_enable_trade...
Hi  Kind experts Alain Verleyen,honest_knave Here is an simple (sample) EA by MLADEN from TSD,it is based on (using) one single on chart indicator, "StepMA of rsi adaptive tema 1.1",and working well as suppose to be,taking trades buy/sell on trend change (color change) optional on current bar,1st...
  Datetime to Int  (1)
Hi, I need to convert the value of Time[] from datetime to an int variable. Exist a quick way to transform an datetime variable into a int variable in Metatrader 4? If is not possible, at least into double could serve either? Very Thanks for your Help!!  :) 
Hello,   Ihope somebody can help me.   Becausethe Nasdaq moves in $ 0.25 increments, I look for my expert a way to round anumber like 5812.66 to 5812.50 or 5812.45 to 5812.25 etc    Who can give me an exemple how to do this? Thanks!   Hans Blancke
Hi all, I hope I can get good answer or comment from this forum. Recently I got a Metatrader Enforcement Team requested to take down my MQL programming service on external freelancing platform (fiverr). They claimed that my service violates MT4 TOS. My service is about MQL programming of EA,...
Hi, I'm try to recall the OrderTicket() in the ObjectSetDouble function, but I haven't in the autocomplete function, when I try to recall it. Where is the mistake? Thank you! void CreateLabels() { int total = OrdersTotal(); for(int cnt=0;cnt<=total;cnt++)     {     OrderSelect(cnt, SELECT_BY_POS,...
  IsConnected()  (40   1 2 3 4)
Can someone explain to me how IsConnected() can work after int start() if anything is written after int start() is execute only after a new tick How can the EA get to it at all thanks
  Pouring the object  (123   1 2 3 4 5 ... 12 13)
Greetings, dear programmers! "For MT4 terminal. I would like to get some tips from you. I have come across the following nuance... 1. I create a rectangle object - it works: 2. I set the properties: - style - it worked; - line width - worked; - colour - worked; - fill - doesn't want to listen; I
Hi  I am looking for a way to enter a market order when a market opens. I check for signals after the market has closed and want to enter on the market open. Is there an EA that will do this? I have searched without success, and I don't know how to code. I would want to be able to specify volume...
  Indicator timeframes  (11   1 2)
Hi guys, So I run an indicator that I have written on the hourly timeframes and it gives me fairly reliable signals. However I have noticed that it often notifies me quite late because it waits for the candle to close, which it only does every hour. And by that point the price might be 20 PIPs above...
I want to edit the main cci indicator file and save it as a customed one for myself for special purpose. I want to use heiken ashi values instead of normal ones. In cci code which i wrote it from cci.mq4 file, there's 2 FOR loops. I want to know should i replace default high, low and close values in...
My EA set pending orders for datetime. All other functions are working well with my Strategy Tester and Real MT4 Platform. I am again saying my EA 100% working well with my Broker. But when i upload to Automatic Validation process it fail to validate the EA. Please look that codes. extern datetime...
I have a program which includes a 'Use Trade Time' option and want to display the answer 'true' or 'false' on a chart. All I can get it to print is '0' zero. Please can anybody help me? Thanks Ken
Hi, when I try my EA on the EA Tester from yesterday, the orders long don't work, just the short ones, but in the live version is all right, same script both work. The error that is returning is #138 ..." requote ". It should be somthing related to broker price. How can I fix it? The live version
I have searched whole the net for a heiken ashi indicator for either mt4 or mt5 that displays heiken ashi bars in a new window AND enables me to add any second CUSTOM indicator to it. I mean the calculation of the second indicator to be based on close price of heiken ashi bars. Is there any...
  MTF Code Issue  (3)
Hi, I was chatting with a developer and he has told me that MT4 has problems using multiple time frames in an EA. I use the following to identify forward trend and then look for lower time frame entry points: StDev=iStdDev(NULL,PERIOD_D1,10,0,MODE_EMA,PRICE_MEDIAN,index+1);
Hi All, I try to down load but get the message  Have you installed MetaTrader 4? MetaTrader 4 is required for installing  I have installed Mt4 so click yes but nothing downloads. How do I get the ea's and indicators I've chosen to download??.   thanks  wib
[Deleted]
Hello Gurus, I am trying to write and read to files which are saved to C:\Folder instead of inside Metatrader 4 folders. Since MT4 build +600, everything related to import external dd like kernel32 has changed the way they previously working well. Please see part of below code to help if you are
  ADX Crossover  (2)
Hello everyone, I am a little bit stuck on how to check for a cross over, I started writing this code. AVD_Minus = iADX ( NULL , 0 , 14 , PRICE_CLOSE , MODE_MINUSDI , 0 ); AVD_Plus = iADX ( NULL , 0 , 14 , PRICE_CLOSE , MODE_PLUSDI , 0 ); AVD_Main = iADX ( NULL , 0 , 14 , PRICE_CLOSE , MODE_MAIN
I have been seaching for this indicator without luck. Is it possible to make an indicator that automatic execute trades when The opposite color  has closed and The New candle has started 😊this is for renko and mt4 system 😊 Best regards Henning Berge