MQL4 and MetaTrader 4 - page 257

Greetings, i'm trying to write a code that ( at a indicator signal ) closes any possible, lets say, BUY orders and opens a SELL order in its place; also vice-versa. I've tried a few different ways, seemed to work when backtesting, but when looking at it on LIVE, the orders do get closed, but the new
extern string BrokerTime = "First Session"; extern string StartTime ="00:00:00"; extern string EndTime ="14:00:00"; extern string BrokerTime_ = "Second Session"; extern string StartTime1 ="19:00:00"; extern string EndTime1 ="23:55:00"; void start() { if(StrToTime(StartTime)<TimeCurrent() &&
Hi everyone..Sorry but i need help...i have ea which work very well on any pair like EURUSD,AUDUSD,EURJPY, but the problm is the same EA doesn't work on ETF, so i want to what going wrong exactly. Does ordersend for ETF different? Somebody help me
Hello, I would like to inquire why there is no intra-chart closing when drawing a cheek trend, for example, or drawing a price channel, but when switching charts between currency pairs, the graphic changes completely or the lines get stuck Why is there no option in the chart fixing fees
[Deleted]
Is there a way in MQL4 to copy and paste objects like 'trend lines', 'arrows', 'Text'? I've tried double-clicking on the object and then pressing Ctrl+c, but that doesn't seem to do anything because Ctrl+v doesn't paste anything. Right-clicking on the object, there's no choice to Copy or Paste.
Hi, I will release another private EA, this is called Electra, we continue using Greek names. This EA is a Multi-pair medium/long term Swing Trader. This is a positive Equity System, it mean the the equity remain in the positive side most of the time.Don't be tempted of halt and close the trades in...
Hi, Does anybody know why might the EA not be opening any orders after I changed the account? I am backtesting so I do not want to restart the MT4 platform and VPS again, I did it once, but it has not opened any trades in a whole week. Best regards
Hi, I need a code that does not allow the user to open a new order under certain conditions. Should this be in the form of an Expert or Script
I have had an EA written for me by someone in Freelance. However, although it partly works, but doesn't work as it should. The problem is that at the bottom of a chart( start of a bullish trend) I wanted to enter a BUY trade, and vice versa. However, the EA enters a SELL trade, and a BUY trade at
[MQL4] int TotalOrdersCount() { int signal= 0 ; for ( int i= 0 ;i< OrdersTotal ();i++) { OrderSelect (i,SELECT_BY_POS ,MODE_TRADES); if (OrderMagicNumber()==MagicNumber) signal++; } return (signal); }
Hi all, I’ve tried to create EA based on ichimoku indi. I want to use the chikou Span (the lagging price line) as take profit. The idea is when the chikou span touches the bar then close the order. My code for the take profit is like this: double takeProfitPrice = //chikou span line; ... orderId
Hi all. I try to export live trading orders (instant and pending) from MT4 account to my web. Anyone can tell me how to do it ? Please help me. Thanks advance. Bizu Note : I dont want to use or any website for public my account statement
Hi  I need to collect ticks info. I use some codes to calculate them . there are 4 types of ticks  : Ascending Ask  descending Ask Ascending Bid descending Bid ( I don't know if there are ticks without motion or not ! )// please let me know if there are.  I'm collecting these 4 and add to each other...
Im new to Mql4 programming and in getting a zero divide error when I'm running this peace of code i got from another forum. Can any one help me fix this zero divide error please. And Kindly tell me how I fix it so that I learn. here is the code <Decompiled code deleted.>
Dear members: I have a client that I have sent an EA, but he is using WineBottler for Windows compability, and he is having difficulties to run the .ex4 Anyone knows how he can put the .ex4 file into the experts folder? Thank you! Luis
Hello, I tried to use new panel/controls interface in MetaTrader. I took SimplePanel.mq4+PanelDialog.mqh from Indicators\Examples directory, put them into one file SimplePanelEA.mq4, moved to Experts directory and I removed OnCalculate function and "#property indicator_*" lines. After attaching to a...
Hello guys, I hate asking for help like this but I've tried to figure it out myself but the only coding background I have is Fortran 77. I am looking to add an email function to this indicator that will zip out an email if a color change is happening from red to white or white to red. The code is...
  Spread Average  (20   1 2)
Hi guys... I would like to ask if the formula that i used to compute the average of spread per tick is: Average=(Ask-Bid)/Tick where: Ask=Ask Bid=Bid Tick=value per tick or Tick Count if you have another formula it would be a big help for me... thank you very much
Below is my sample code: extern ENUM_TIMEFRAMES tf = PERIOD_M15 ; iMA (symbol(), tf, 169 , 0 , MODE_SMA , PRICE_CLOSE , 1 ); I was using TickData for Back Test. (without using it, there is no problem) 1. How can I get iMA() value since 00:00 but not time like 17:00? 2. How can I preload some bars
  Error message  (2)
I just created a new signal and this message show upError message: Authorization failed. Please check trading account data. Account number+password+server are good. What can be the problem
  while and sleep?  (7)
Hi all, A friend of mine asked me a question, I simplified it down to the following test code: extern int TimeInterval= 900 ; // xx minutes to send the e-mail int start() { while (TimeInterval> 0 ) { SendMail ( "someTITLE" , "someTEXT" ); Sleep ( TimeInterval* 60 * 1000
Hello, A short question I haven't quite figured out. Can an indicator/ea know its filename? Sort like the following. Thanks! String fn = WhichIsMyFileName();if(fn == 'MyIndicatorName.ex4'){    DoSomething();} else {    DoSomethingElse();}
Hi, I have an EA and installed MetaTrader 4 Client Terminal build 610, it seems everything is fine, EA is working as expected, but there is a warning in the toolbox, which I cannot understand: sign mismatch I use a function taken from https://www.mql5.com/en/articles/1412 and the warning is in this...
Hi. I am trying to change the external bool value from true to false,but every time i restart the terminal it changes back to true.Is there a way to do it? extern bool reset = true ; void OnTick () { if (reset== true ) { int handle = FileOpen ( "Time.txt" , FILE_COMMON | FILE_WRITE );
I control the terminal from a remote process. I load any script on the chart without using a DLL. The scripts load and work. As soon as I load a script using any library, the terminal hangs. Of course, all the scripts with libraries work if they are loaded manually. Anyone have any idea? I should
Good afternoon, I am having problems interpretating fractals because the indicator does not behave as I have read it should. This is what I though a fractal was, and it should be componed with 5 bars, right? Instead, MT4 is drawing fractals everywhere, not componed by 5 bars or any pattern that...
When I run a backtest, it seems to give me the results, which I will just assume are accurate because I have no way to verify. I would think it should give me a detail of every time that it entered and exited the trade during the time period, but I guess not? This example says 1 "pass" (what is a
Hello and if someone would please help with coding simple yet I believe would be a great scalp counter trade strategy if you can master this. I have been testing this and I believe that I have pretty much mastered it to where I can trade this 100% of the time and be successful at it. I just don't...
Hi There, As the documentation says, the OrderSend function: Ord Returns number of the ticket assigned to the order by the trade server or -1 if it fails. It should return the recent opened ticket number right? But it always return 0 for me... Here is my code: int ticket= OrderSend ( Symbol
//+------------------------------------------------------------------+//|                                        super-signals-channel.mq4 |//|                Copyright © 2006, Nick Bilak, beluck[AT]gmail.com |//+------------------------------------------------------------------+#property copyright...