Download MetaTrader 5

MQL4 and MetaTrader 4 - page 198

To post a new topic, please log in or register
Hi, I am currently backtesting a strategy and the problems are 1) orders are being placed at every tick 2) orders are only in one direction and usually at the beginning of the test even if the conditions are satisfied later on  I am attaching the code for the EA along with the backtest report. I...
if (((AccountStopoutMode() == 1)&& (AccountFreeMarginCheck(Symbol(), OP_BUY, Lots) > AccountStopoutLevel()))|| ((AccountStopoutMode() == 0)&& (((AccountFreeMarginCheck(Symbol(), OP_BUY, Lots)/AccountEquity()) * 100) > AccountStopoutLevel()))) What could be the issue? i would like to perform...
Hello forum, So far I have this, below, but it counts ALL trades in history. How do I break the cycle so only the LAST CONSECUTIVE trades of same sign are counted - I have some (complicated) ideas but I feel there might be a a quick way?  Many thanks in advance, Dan. int GainCount = 0; int LossCount...
Hey Folks, I just started with Mql4 and built my first few EAs, so this is prob a stupid question for the "Pros" but I would be very pleased if you can tell what I miss here.  So i built an EA based on Bollinger Bands, nothing special and he fails pretty bad, so I thought why not just turn...
Hi, when I draw an object, let's say a trendline, and I change the color and maybe the style. When I draw another trendline it has the same color and style as the trendline I modified before. Same with rectangles and other objects. Is it somehow possible to set a default color and style for an...
as I know i can add a button use ObjectCreate , and ObjectType  set to Button but How do I add a CheckBox in the chartWindows , i can't find the ObjectType for CheckBox
Has anyone any idea how to get and install a time that counts down the seconds until the next candle appears for mt4 forexpro platform... thanks
Good Morning, Can someone help me convert the indicator RSI BB v1.01, whose code METATRADER 4 is described below in code to ProRealTime ?. Thank you for your attention and please help me. I need this indicator ProRealTime Regards, José Freitas The Code of RSI BB v1.01...
Hi Experts, Strange thing for me. I have a very short code. There is no error when compiled and runs perfectly on the charts. But, when I compile it with Debug, it gives an "Array out of range" error. I don't understand, why? Can you help me? Short code attached. Thank you!
I am trying to get a simple string showing in last tick was up or down, somehow it gets stuck in "down" position. Obviously I am missing something.. so any help will be appreciated. Dan. //+------------------------------------------------------------------+//|   TICK UP OR...
Does anybody knows if there is a trading signal for Metatrader4 platform that will send buy and sell signals when an indicator ( like say CCI ) crosses a custom drawn trendline on the chart indicator? Thank you 
Hi, I was wondering if is possible to link my EA's trading signals to my blog. Is there some bridging method to do it? I wish to create such a live trading journal! Many thanks Leo
Hi, I'm writing a script that insert and delete orders. With pending orders it's all right but when I search to insert a market order or close one of it I'll frequently recive error 129 (Invalid price) I read on the online documentation that kind of error can happen if there has not been the...
Hi... There are a way to disble AutoTrading  via MQL4 Code ? I am using a third party EA thats good, but not with strong news.... then i think on improve trade blocking on news, doing it on an indicator and put in the same graphic... then the the indicator stop/restarts AutoTrading.
Hi everyone  could someone  help me to get a function for counting open orders  thank you very much :)
I am trying to use GetDiskSerial.dll in mql4 to get HDD serail num. {*******************************************************}{                                                       }{       Borland Delphi Interface Unit                   }{...
I need a programmer
Hi coders, I made a small test indicator and it doesn't always work how it should. Sometimes an alert pops up but more often it doesn't. Is there something I forgot? Edit: Obviously it only works when I click on the corners or directly in the middle where the little squares are when the rectangle is...
Hi All, Been a lurker here for a while now and found countless useful topics for which I am very grateful :)  I am now venturing into the world of MQ4 and would like some pointers on how to get started with what I want to achieve.  I wish to build a custom indicator which simply prints arrows and...
Hi All, I'm trying to write a Alert condition as it showing in the image. I wrote the following code for that condition . Is it right because I get the alert In the candle 1??? while need it the alert in candle 0    double MA_0 = iMA(NULL,0,MaPeriod,0,MA_Method,MA_Price,0);// bar 0   double MA_1 =...
//+------------------------------------------------------------------+//| Expert initialization function                                   |//+------------------------------------------------------------------+int OnInit()  {//---//---...
Hello,   i need to open a webpage in chart window or converting a chart window with a web browser i hope to find a functions helping me to do that thanks  
Hi Coders, I'm running many optimizations and I would like to clarify few things. 1. Could you explain me please the meaning of Genetic algorithm option at the optimization? What does it use for? How is it working? And there is the Optimization panel in this window: 2. What are these limitations?...
Hi. Any body know which programs and softwares can run metatrader experts and indicators formula?
I tried to test several symbols (about 100) with same setting in MT4. I read several topic about command line and  also in terminal help. However, terminal did not start testing (build 765) after I tried hundreds of times. I hope somebody here can give me a hand, thank you. I used: terminal.exe...
Please can someone help me to get what I need. I know how to draw a Line in the chart, But my problem is how can I make it start from the point I need and drawing to the right side. For example : I need the line to start from the high of candle 3 and go to the right side to candle 0 Any help will be...
Does anyone know how I could send email alerts at certain times? I am looking to do this every hour, the Sendmail function is easy enough but I'm stuck on a Time loop?   Thank you in advance 
Hi, I don't want to test a certain strategy. More like to prove if an event1 leads to a certain outcome. Therefore I would like to run some tests but without any spread to not skew the result. Now it seems that a input of '0' in the relevant spread field in the strategy tester leads to the current...
Hi, Why do I get this compile error with the ArrayFill function?  ArrayResize and  ArraySize have no issue with the type.  *** Compile error (1sr parameter of ArrayFill in bellow code) : Error: 'Orders' - type mismatch  *** Order is a normal class. void Test() {    Order *Orders[];    Order *pOrder...
Hi,  I'm an admin for a vps company that supports MT4 we have had a small number of clients who are experiencing random MT4 disconnects that do not reconnect until the MT4 terminal is restarted. In troubleshooting the issue we have verified the remote broker’s trading server is online when...