I have been running the EA and did not notice the 4108 error before - but mow the code refuses to close my pending orders and give 4108 - invalid ticket errors. Here is t //Close Pending Orders when no trades open Count = 0 ; if (Sell == 0 ) { for (Count = OrdersTotal ()- 1 ; Count >= 0 ;
Hi all, my objects disappear & after a few seconds or so they reappear again. If you know the problem please help. void OnTick () { int Bottom= iLowest ( Symbol (), 0 , MODE_LOW , 75 , 1 + 40 ); ObjectDelete ( 0 , "Bottom" ); ObjectCreate ( 0 , "Bottom" , OBJ_RECTANGLE , 0 ,Time[ 0
Morning all, So a quick question about brackets, which is correct? if (a < b && c < d){ ... } ..or do you bracket the individual conditions within the function call, as follows: if ((a < b) && (c < d)){ ...... } or does it make no difference at all? Many thanks and all the best to y'all
It is possible for base class execute function on child class? Example: I have base class as shown below. The constructor only execute update() function. And the update() function must execute the function that has on it child class // Base.mqh class CBase { private : protected : int
Hi, I am using OnChartEvent > CHARTEVENT_OBJECT_CLICK to change the colour of some text when clicked on, which is working, however when I close MT4 and then open MT4 it has forgot it the change and loaded the default colours from the indicator. I have tried to save the template using
Hi all, I'm considering a strategy where I'm opening trades manually, but a trailing stoploss is managed by an EA. That seems easy enough, there appear to be plenty of EAs that can do that. My question comes in when, say, I'm trading 2 different strategies on the same account, and on the same
What do I need to delete or reset to get the current build of metatrader to save all it current display settings so that when I close and open MT4 I still see all the toolbars and navigator windows setting I had when I closed MT4?
I think the below code for IsNewBarOnTimeframes() might be useful for anyone who wishes to monitor the end of a bar from any time frame whatsoever in MT4. Hence, I decided to share it for perusal. Happy using: bool IsNewBarOnTimeframe( int timeframe) { datetime BarOpenTime = iTime ( Symbol
I have been using this piece of code for a long time: if ( OrderSelect (orderTicket, SELECT_BY_TICKET) == true ) { if (OrderCloseTime() != 0 ) { isTradeRunning = false ; orderProfit = OrderProfit() + OrderCommission(); return ; } } It always worked. Now I have it in a
Hi! The following code is an example of metaquotes. #include <Controls\Dialog.mqh> #include <Controls\CheckBox.mqh> //+------------------------------------------------------------------+ //| defines |...
Hi my friends, I've made a mistake and change the extension of .ex4 files through its properties and by " open with " button, I mean I chose to open .ex4 files in "notepad" application and it is completely crashed right now. Does anyone know how to change it to its default condition in order to open...
Hello to everyone. After I read MIDAS articles by Dr. Paul Levine(RIP) a great search began for me for the MIDAS indicators. But I couldnt find any "valid" ones that can be used as it is told in the articles. So I gave my shot at Dr. Paul Levine's article. I have to say it is one of the best written...
How does one check the latency from the mt4 webtrader terminal to the broker's server? I don't see any lines in the Journal tab showing the ping or connection speed when logging in. And there is no visible method to "rescan server", unless I am missing something. I selected "debug" from the context
Hello, My EA is working fine on live testing on demo accounts, is opening closing and managing trades. Most of the trades it opens has tp and sl based on the daily pips range. I check the daily pips range with: Range = (NormalizeDouble((MarketInfo(NULL,MODE_HIGH) - MarketInfo(NULL,MODE_LOW)),4));
I would like to calculate the „Pips“ difference between a indicator and the Close. The Parameters which I need for my calculation (in my opinion) 1. Breakout indicator (Support/ Resistance) 2. Close Course My Try in code it works: //Initizilation (BarClose) double BarClose= iClose (
Im trying to send an order but it seems that my broker has limits to the orders sent. I had the following line of code which gave me an output of 10: Alert(MarketInfo(NULL,MODE_STOPLEVEL)); and the following is my order send function but its not accepted
Hi, val1: 1.40900 val2: 1.41100 How can I get 20 points? Regards, Dejkan
Hello, Now I'm looking for Metatrader4 Historical Forex Data including all time flames(1M, 5M, 15M, 30M, 1H, 4H, 1D, 1W, 1M) and from 2011 January 1st but I can't find anywhere online. I went to Tools > Options > Charts and then set the max bars in history and chart to a really big number. Then
The situation is, on the initial run, I set that number on the input. After EA run, it meet certain criteria, it will reset that variable to be 0, and keep it 0 until I change the input variable again to be something else. Is there anyway to do that?
Hello!!! I have a code like this, it works great but I want order to have 10 pips distance between orders. Can someone help me fix it. Thank you! int total = OrdersTotal (); if ( 10 > total) { if (Price_S2 > Ask && Regression_Channel_Up) {
[Deleted]
Hi, I'm an amateur MQL4 programmer, so this question may sound very foolish to you, but I had to ask this, as I need the answer. I'm coding an EA based on Daily time frame, and I know that Close[i] returns the closing price of the specified bar of that chart ("Daily" in this case). But I also need...
I would like to be able to change the value of this property value #property indicator_maximum, in the program. Is it possible? If not, is there another way to dynamically change the window maximum? What I am trying to do: I have an indicator that I drop on multiple charts. This indicator shows...
Hi, 5 digits: double value1 = NormalizeDouble ( 1.21776 , 5 ); double value2 = NormalizeDouble ( 1.23276 , 5 ); double calc = NormalizeDouble (value2-value1, 5 ); Print (calc); 2 digits: double value1 = NormalizeDouble ( 62500.73 , 2 ); double value2 = NormalizeDouble ( 63500.50 , 2 );
Hi everyone, I have this indicator that I want to used in my EA. I found it doesn't works cohesively between the value on the chart and on the strategy tester. this is screenshot from my chart, the blue line on the bottom is the indicator that I mentioned. In this chart the indicator shows bull
This indicater help me draw an arrow in the chart. I wan add a alert when it draw a arrow. but i can't find where is the draw arrow order and where i should add the alert order. Thank a lot double ExtBuffer0[]; double ExtBuffer1[]; double ExtBuffer2[]; extern int fastma = 5 ; extern int
I'm using some MT4 installations with a Forex.com demo account either for historical analysis or market watching. For my live market watching setup I want to limit the number of bars to 800, which I set. I mainly did this because the AUD/USD daily chart has a rogue candle at 2016-10-11 (october 11)
[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you.
(11449 1 2 3 4 5 ... 1144 1145)
Hi, just signed up and decided to start a thread. I think it's the right thing to do as I have a lot of questions myself. I'm tired of looking for answers on other forums, some flooders. I have no idea what to do with the topic. The only difference is that they do not have enough information for the
Hello. I'm using Soft4fx. It can be used for visual backtest . It opens an offline chart in a past time and go ahead tick by tick. I can enable "show ask line" on the offline chart, and it shows the ask line. But my indicator can not read ask price. Ask returns zero SymbolInfoDouble ( Symbol ()
Hello all, I need a help to correctly determine whether the last trade closed by it's stoploss or not. Is the code below enough? bool closebysl=false;for(int i=OrdersHistoryTotal()-1;i>=0;i--) { OrderSelect(i,SELECT_BY_POS,MODE_HISTORY); if(OrderClosePrice()==OrderStopLoss())...
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.