MQL4 and MetaTrader 4 - page 190

I have had no luck with MUTEX so I thought this might work. I wrote a ''Master" ea that cycles through my 10 preferred symbols three times each before moving on to the 18 lesser symbols. The code writes to a global variable every half a second, each time representing the next symbol in the
Hello, I need some help please. I have download this expert advisor a few weeks ago, and i don't know why, but the trailing stop does'nt work. Even if i configure any value, the trailing stop never start. If you have any idea why, thanks. Best regards
Hello. I am looking to implement a code into an existing EA (Scalper) to close all trades on X amount loss floating and start over again from beginning. Someone can help me out? Cheers :)
I am trying to write MQL4 code to modify .tpl file from templates directory. However, I am not able to open any .tpl file from template directory using FileOpen() function. file name specified in FileOpen only opens files from MQL4/File directory but it can NOT open file from templates. Can someone
void OnTick () { Count(); if (Automated== true ){ if (count1== 0 ){ int ticket= OrderSend ( Symbol (),OP_BUY, 0.01 ,Ask, 3 , 0 , 0 , "My order" , 0 , 0 , clrGreen ); if (ticket< 0 ) { Print ( "OrderSend failed with error #" , GetLastError ()); } else Print (
I want to define variables depending on a condition so I write if (CONDITION== 0 ){ double vol0 = AAAAAAA , vol1 = BBBBBBBBB , vol2 = CCCCCCCCC ; } else { double vol0 = DDDDDDDDD , vol1 = EEEEEEEEEE , vol2 = FFFFFFFFFFF
Dear sir & madam I see Fx divergence and it's so amazing. Is there anyone help me to translate to a variabel that signal? Red arrow is upper the line is sell signal, how to translate to variabel. and green arrow is below the line is buy signal, how to translate to variabel. and make a simple...
void trailingstop_check( int trail, int magic=- 1 ) { for ( int i= 0 ; i< OrdersTotal ();i++) { if ( OrderSelect (i,SELECT_BY_POS)) { if (magic == - 1 || magic == OrderMagicNumber()) trailingstop_check_order(OrderTicket(),trail);}} } bool trailingstop_check_order( int ticket, int
At ovo.cz, they have an indicator which creates tick charts. Once the offline tick chart is loaded, there are lots of candles from the past, and so it means OVO managed to determined OHLC for every candle in tick chart. How is it possible to get those when all there thru MT4 is 1-minute charts
Friends, I'm looking for a MT4 EA that can automatically set T/P (for each open trade individually) to take account of it's swap costs. So say, I open a trade and want to take TP of 10 pips, but if the trade continuous to open for a couple days, EA can automatically increase T/P to account for the
i have a buy order ...that has a stop loss of 1.5 times the ATR (the atr_stoploss_modifier=1.5) order_num=OrderSend(Symbol(),OP_BUY,SetLotSize(),current_ask,2,current_ask-atr_stoploss_modifier*atr_value ,current_ask+999*_Point*broker_digit_modifier)
I've gone through the process of adding push notifications but when I press test I'm not receiving any notifications what do I do now
Hello all, Is there an .ini or settings file for Metatrader 4 where we can change these defaults? Or any other trick that you know of? Thanks in advance
Sometimes I've come across EAs and indicators that are bundle into a exe file, which makes installation easier by putting all the right files in the all right folders to make it less confusing for the user to install. Apparently there are ones out there which even allow you to select what mt4...
My MT4 on my computer keeps showing "no connection" at the bottom right and I have tried logging in and rescanning servers and it is still showing that error which is annoying me so much. I use a Windows computer. Please can I get help
Hi all I'm fairly new at this, so apologies if it's a stupid question. Anytime I open a position, I add a trailing stop to ensure I don't lose more profits than I am comfortable with. I find the tool very useful. However, in order to add a trailing stop, you need to click on the open position in the
When running tester in auto configuration mode, tester starts very quickly and even the account is not activated yet. It takes few seconds for an account to activate in the mean time tester has already performed some testing which generate in valid results. Does any one has idea how to add the delay...
Hi i have Custom Indicator with to many button and line on chart. everything if work correctly when the indicator drag on chart but when the user change the time frame OnInit function restart all the variable, button state and all of the other thing to the default, so use should change everything
How to distinct OrderSymbol() in MQL4? I have data: Symbol | Type | Size GBPUSD | Buy | 1.5 GBPUSD | Buy | 0.5 EURUSD | Sell | 1 USDJPY | Buy | 2 I want the result: GBPUSD EURUSD USDJY found one way on the internet but am i interested in any other idea? Thanks
Hi, can you please advise me how to encode the EA to close the positioned close candle? I want to use EA for RENKO, so EA will not count the TimeFrame. Thank you void TechnicalAnalysis4() { if ( (Hour()== 23 && Minute()< 2 ) || ( CloseCan==Ano && iTime ( NULL , PERIOD_CURRENT , current+ 1 ) >
I want a script or EA which can close 50% of all current opened buy and sell orders is there anyone can help me
Hello I am desperately looking for a simple piece of code that works just for moving average crossover. All the mql4 code I find on the internet is crappy and not working. Thanks
Hello, I'm new to MQL4 Programming and I hope I'm posting this in the right section but I need help, I've been trying to write a code that finds the lowest low and the highest high (Day's range) between 00:00 A.M and 08:00 A.M but so far i have been stuck in a CopyLow function (I don't know what to
[Deleted]
Hello, I am fairly new to Mql Programming , so please excuse me if question is somewhat out there. I need some advice regarding a scenario: i am checking if an indicator arrow is visible in for loop Like this : for ( int i = 0 ; i <= 5000 ; i++) { if ( iCustom ( NULL
Hello, I am trying to code my system however after compiling it returns the "not all control paths return a value" and when I double click it shows its in the following block, could someone please point out the problem. Thank you in advance bool CalculateCurrentSellOrders( string symbol) { int
I was wondering how we can draw a histogram on the chart or rather cover the candleswith a specific colour. For example I'm trying to cover white candles with greenwhen the white candle is longer than 15 pips. Here is the code I've written andI don't know what's wrong with it. Any ideas?...
I'm frustrated because someone answered this for me but I can't find it in all my old posts and comments. I'm struggling to figure out how to run a segment of code only once, particularly when drawing an object. For example, if I create a bool variable for a MACD crossover and I want to draw an
[Deleted]
Hi If possible, give me a very easy guide. What should I do to have such a text in the right corner of the chart
I have a few buffers and numbering them gets tedious because I keep adding or removing ones, so I have to change all their Identifying numbers as I add or remove buffers for instance I have SetIndexBuffer(1,A); SetIndexBuffer(2,B); SetIndexBuffer(3,C); and If I remove SetIndexBuffer(2,B); , then I
[Deleted]
Hello to all professors With this code, I want the first position that went to 10 pips of profit to be closed (the first position) Sales positions are calculated separately and buying positions separately But here the expert comes and checks that every position that was in 10 pips of profit finds