MQL4 and MetaTrader 4 - page 1200

[Deleted]
How to return more than two parameters
here is the script I wanted it to loop all the way to get max profit but it seem that I overcharged it with functions or something says stack overflow but I don't get where it's overloaded with functions (I seen lots of eas that does use way more functions then that and ran) extern double threshold...
[Deleted]
can someone please answer a rookie question... I want to close my open order at the close of an hourly candle, but am having a problem doing it. eg : I open a trade and then when the hourly candle closes then close the trade no matter if in profit or loss... I tried this : for(cnt=0;cnt<total;cnt++)
[Deleted]
  order select  (2)
when i have some orders and i use OrderSelect(,by pos) to select orders if i write OrderSelect(0,by pos),it returns my newest order(or modification) or my last order?
[Deleted]
Just after a quick answer, what code can i use to stop the EA from opening orders as soon as it is attached to a chart ? Thank You in advance MW
[Deleted]
Hello, I'm trying to develop a script that draws arrows on a candlestick chart. I'm finding it somewhat tricky to position the arrows at a proper vertical position. First, I tried positioning the arrows at High[] for each bar. Sometimes, however, the body of the candlestick is drawn on top of the...
Hello, I know that I am not allowed to send the TP and SL with my OP_BUY or OP_SELL order. But what is, when I want to give an OP_BUYSTOP or an OP_SELLSTOP to an intermarket-broker? Can I send my SL and TP after sending the limit or does the Order must be open to send my SL and TP? Lot's of thanks,...
[Deleted]
I just had an issue with several open live positions in my IBFX MT4 account where after many attempts over several minutes I was unable to modify the SL and TP of several open positions. I consistently received the "Trade Context Is Busy" error. The only way out of this was to reboot MT4 after which
New article Econometric Approach to Analysis of Charts is published at mql5.com: This article describes the econometric methods of analysis, the autocorrelation analysis and the analysis of conditional variance in particular. What is the benefit of the approach described here? Use of the non-linear...
Hi all, I would like to know what components / filters you have in your trend trading system. Don't need to give exact details. I will start with mine 1. Entry on 5 min time frame 2. Signal comes from H1 time frame 3. Daily time frame to check trend Only 3 components Please share yours
Hi Guys, Something very disturbing has happen to me. I run an EA script to handle various aspects of my trades. In some cases, when I use a trade as a fence, there is a line in the script that says: if (OrderTicket()==183784037) continue; //don't process this ticket This trade had a constant SL...
[Deleted]
  Bug with iMACD?  (3)
I'm trying to get the current value for timeframe M15 on a M5 chart for MACD and the values I get for period [0] don't match what the MACD indicator shows me (using MTF MACD). Code:       MacdCurrent=iMACD(NULL,15,5,13,1,PRICE_CLOSE,MODE_MAIN,0);      MacdPrevious=iMACD(NULL,15,5,13,1,PRICE_CLOSE...
[Deleted]
Does anyone have zero profit indicator for opened trades? Assuming you have 10 trades opened in gold, I want to know at what point, there is zero profit if I close them all... Would be nice if it worked for all trades, for only buy trades and for only sell trades. In other case, how do you calculate...
[Deleted]
i wrote a program that i have some orders at the moment. i put my orther's ticket in an array that i can see the tickets on top of my screen. in strategy tester my program works very good with no problem but when i run it in real account Ea loses the tickets and can't control the orders. what is the...
  Can't test EA.  (1)
Hi, I'm looking to answer what have I made wrong cose my EA is working (sending and closing orders). The problem i I can't test strategy. This is my first EA so any prompts appreciated:) |
[Deleted]
hi Is there any way or sites that publish news as a format that i can input them in my EA? in other word is there any alerts that i can use it in my program?
How can i look for a specific price pattern in multi time frames? It's how to make the code so it looks for my pattern in M5, M15, M30 .... that's my problem. Thanks!
for (pos= OrdersTotal ()- 1 ; pos >= 0 ; pos--) if ( OrderSelect (pos, SELECT_BY_POS) && OrderMagicNumber() == 1 && OrderSymbol() == Symbol () && OrderType() == OP_BUY) count++; ABUY= 2 ; //ABUY if (count== 0 ){ for (pos= OrdersTotal ()- 1 ;
Hi, I need to create an order every X candles whan X can be any number of candles, may anyone know to write something like this ? Tank you.
[Deleted]
Does anyone know what code to insert and where to place it, to limit one entry per a candle within an EA. I've searched the forum and I've found some code pieces, but not where to insert them. What is the best code for this function that would work on any selected timeframe? I've attached a sample...
[Deleted]
  how to close ?  (2)
if buy Profit + sell Profit>0; I want to close the buy ticket and the sell ticket, the lots is difficult. but it is error. how to slove it ? //close void zcloseall(){   bool   result;   double bprice;   int    cmd,error;int total = OrdersTotal();   for (int i = total - 1; i >= 0; i --)...
[Deleted]
I am developing JS-PHP based console enviroment. Which with i could controll multiple MT4 platforms with multiple EAs (so i might not have access to it source code). I need to throw Error or some command which will disable "Expert advisors button" Thanks
int start()  {    int ABUY;  int ASELL;  int pos;       if ( ABUY== 2 ) {             if ( ASELL>0 ){             for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if (             OrderSelect(pos, SELECT_BY_POS)                              &&  OrderMagicNumber()  == 2...
[Deleted]
Hello everyone, Please i need a help to know how can i calculate number of trad was open per day,as i search for that by stander function and i don't found it Please i need your help Thanks
[Deleted]
Hello, Can someone please tell me a way, how to disable expert advisors by EA? I saw a EA once, which throw error of some kind and then the expert advisors got disabled. Thanks for replies
[Deleted]
Very good EA, but there is a defect or a bug, it's hard to tell, in general it makes buy trades but not sell trades, and does not make more than one order... I am not sure what to do with it, but I am not sure what to do with it. P.S. Even though it has defects, it shows great results
[Deleted]
I´m using MT4 on my laptop and if I insert email alert which activates within few hours or maybe a day or so, I get the alert with no problem. alert I added few days ago and should have come to my email address just over a day later didn´t but when I restarted my computer this morning I got the...
[Deleted]
  mt4 issue  (1)
Hi I was beating my head against the wall trying to get this Ea to do what i want come to find out its not me :) I have a MA line going through the middle of a bar but it is triggering my EA as if the bar is below. When i do a mouse over for information i get the correct information according to the
I'd like to import some functions from a dll file. I saw there were some topics on importing C# dll's, but these functions are ones I wrote in mql. I simply wanna replace #import "function_library.ex4" with #import "function_library.dll" I tried a few things, but no go. Any suggestions?
[Deleted]
Dear all, I am working with candlestick bar and I am writing an EA for it. How can I determine the status of current candlestick whenever I want? In other way, How can I check whether current candlestick is closed (opened, lowest, highest) or not? Thanks Binh Nguyen