Download MetaTrader 5

MQL4 and MetaTrader 4 - page 542

To post a new topic, please log in or register
I'm copy  "trainhorn.wav" to  C:\Program Files (x86)\MetaTrader - EXNESS\Sounds. ... PlaySound("trainhorn.wav"); ... Why alert sound by  "alert.wav" only ? Thank you Remark  "trainhorn.wav" = 28k
Dear Guy I just create a new EA with my Metaeditor. After I create I just goto my MT4 location/experts/ but I can't find my EA in there. Therefore I also create another EA then go again I didn't find my EA there also. Then I search my computer, EA found this location 'C...
//=====Hedge EU when UC is opened by EA=======   for(int pos1 = OrdersTotal()-1; pos1 >= 0 ; pos1--)    if (OrderSelect(pos1, SELECT_BY_POS, MODE_TRADES) && OrderSymbol()== "USDCHF")   {   if (OrderType()==OP_BUY || OrderType()==OP_SELL)   ticket=OrderSend("EURUSD",OP_BUY,Lot,Ask,30,0,0,"",0,0...
hi! how subtract a price from variable? If i want to subtract a variable with fixed amount of pips,  how i have to write the amount of pips? that way- 0.000X or just subtract X pips from the variable? this is how i wrote it: if( ((O - C) < 0.00040) || ((C - O) < 0.00040) )  explenation: if open -...
Hello, I have an indicator writing for Ninja Trader platform, and I would like to convert it to use in my Mt4 platform.. Is it possible? I don`t know so much about programming, so I`m asking for help, if it is possible and someone is able to help me, if it is not so hard, I would be very very...
Hi, I need help to create an EA base on the following terms EA will open trade base on chart M1, M5, M15, M30, H1, H4 and D1. EA will not open a new CYCLE of trade if the previous CYCLE is not close. Example:- M1-Sell, M5-Sell, M15-Sell, M30-Buy, H1-Sell, H4-Buy and D1-Sell EA will open sell...
hello guys. can anyone help me with this. im trying to add a code that  will 1.) close all order when one order is close.  2.) open order on the price the first order was open.
I've noticed around in the forum various references to Polyline, by WHRoeder. As I understand it, it allows an EA to draw lines on a chart the way an indicator would. https://www.mql5.com/en/forum/130907 Is this correct? Is it usuable within Strategy Tester? What about non-standard timeframes, can...
hello all; i am practicing mt4 lang and made this ea whic closes orders if profit lies bw 1.5-2. closes same order if loss lies bw -2  to  -3.. but the code is not working on ecn 55 digit broker... int start()  {//----if(OrdersTotal()==0){   OrderSend(Symbol(),0,0.04,Ask,30,0,0);   OrderSelect(0...
How do i get QQE value using iCustom ? What did I did wrong Hi guys, I have a QQE Indicator call QQE Alert MTF 5   I would like to use this Indicator value on one of my EA which I applies it using this way QQEvalue = iCustom(Symbol(),15,"###QQE_Alert_MTF_v5###",0,0);  // I would like get the...
int array[OrdersTotal() ]; Why can't I declare like above ?
How to calculate the maximal draw down truely ? Where Max draw down is based on Equity or balance ? Why the rules: MaximalDrawDown = Max of (Maximal Peak - next Minimal Peak); and  MaxDrawDown % = MaxDrawDown / its MaxPeak * 100% ;why these rules are differents of the max drawdown displayed on...
Hai i am new to forext trading and EA creating . i am creating a EA with strategy tune site that is working in all other demo mt4 platforms but i try with my easy-forex live account it is not working anybody can you help me to solve the problem? #define __STRATEGY_MAGIC...
sometimes my trades don't always go through , so I run it in a while loop , but if I get error 134 (no enough money , it must break out the while loop , cant seem to get it right , can someone help me please.
Hello guys, I am new to  MQL programming and I was just wondering if there is a way to make an EA that places two trades (buy stop and sell stop) two minutes before news announcements and it must close them 2 minutes after the news comes out. The orders must cancel each other (one cancels the other)...
Dear all... PLs help me to edit this EA... - EA only one trade per signal - event the trade has been close. - when EA send signal BUY, trade only one with SL and TP, when the oder hit SL, EA do not trade and waiting to next other signal: SELL. Thank for any help....
EXAMPLE: IF CCI(14) > 0 AND RSI(14)>50 THEN ENTRY BUY IF CCI(14)<=0 THEN CLOSE BUY IF CCI(14)< 0 AND RSI(14)<50 THEN ENTRY SELL IF RSI(14)>=50 THEN CLOSE SELL YOUR TRADING WILL BE SIMPLE AND PROFITABLE...
Hello everyone, Can anybody help me? I need an EA to buy when price goes and closes above EMA 30 and place the SL 1 pip below the EMA 10 and then when price goes up, move the SL along with EMA 10 and the same when price  goes and closes below EMA 20 and SL 1 pip above EMA 30. Thanks
Trying to debug an EA by adding Print statements: I have 11 Print statements that should print every bar (in this case daily bars). The problems are: 1. For day one only 7 items print, 2. For days 2-5 nothing is printed, 3. Only 6 items print for day 6. everything is ok after that. I found out that...
Hello, please can you give me some advice how to make this kind of indicator?   I would like to program indicator which mark situation described below by rectangle. Situation: if 3 or more bars have open and close price in range of the bar before these 3 or more bars (red line on chart). see...
Advise on how to do it. Very much appreciated.  Thank you for your response guys, i also need this 'on every bar'  issue to be resolved. 
Hi all, I'm looking to put a pending order opposite to a buy already open. For that I though to make use if this code. Nevertheless is not working as expected. Also I receive the error Invalid lots amount for OrderSend function.  Could you show me the right way to do it ? This is the code to get the...
I am not sure if users can create a function with an array var. Or such a function must always  be a built-in one 
Hi all,         Can any one help me in making an EA like this. I want to create a EA based on this following conditions. For this i want 3 EA to run like EA1,EA2 and EA3 on any pair. Time frame 1 min and 30 min charts I want to use CCI indi so now the requirement is like this   1. EA1 set values...
I am having a problem opening a demo account.  It seems as though it is stuck on the final screen.  Is the fact that I have an account with MT5 causing a problem?   thanks 
I know, im not a coder. But i need a help still. The code shows I want to add script wich is able to close all trades at specific time, but I'v got this message: 'start' - function already defined and has a body thanks a lot #property copyright "Copyright © 2012, ."#property show_inputs#include...
Hallo Friends, I got this CCIarrow indicator free on the web. Can anybody add a sound alert and a visual alert at the arrow to this attached CCIArrow indicator? (alert once for each arrow) Thanks and regards,   Mizan Sharif   
I have the following code in the start section: int counted_bars=IndicatorCounted();  int i=Bars-counted_bars-1;  Print(i + " Start");  << when I run the code on a eurusd i = 65019       while(i>=0)   {  // Print (i + "Not Start");   <<< This is commented  i--;  }    Then I uncomment the 'Not...
Have successfully used the script below for 'simply sell' (& similarly 'simple buy') some time ago. Tried it again but keep getting 'error # 130' and no success What may have changed? How does the code need to be updated? Any support much appreciated, many thanks dolphin44  int start(){int StopLoss...