MQL4 and MetaTrader 4 - page 333

  Help me with a code  (14   1 2)
I am finally trying to take the first steps with programming and I am inserting a lot calculator system on one of my EAs that does not have one. The code is this. extern double LotSize = 0.01 ; extern bool UseMM = false ; extern int Risk = 1 ;
hi every one I use below Indicator to show candles time in all frame time now I want when 10 seconds left until the end it changes font color to Red can anyone help me ? Best regards Neda
I did this small variation of the MACD indicator, where I only changed the moving average from Simple to Exponential, then added two buffers to make the indicator line change colors. However, my indicator is bugged. After running for some time the values start getting messed up, and I get multiple
Hello guys, I am very confused. Why does this code not work if I press 'Q' but it works when I draw any object manually? void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) {//--- ChartSetInteger(0
Hello to all my friends and professors. I want to create a mini chart that allows you to add any indicator separately. Is it possible for friends to help? It should be like this
Hello dear trader community, I have coded sth.It does not give order. I am about to lose my mind. Anyone can help me solve this problem out? I really appreciate that. Thanks in advance for your help and time. Best Regards //+------------------------------------------------------------------+//|
I am using a swap strategy with two account with different brokers (hedged accounts). I have the code that sync between the two account (via two brokers). When i close a BUY order with broker A, my EA send Close message and the SELL order on broker B gets closed. i get profit from (swap-commission)
Hello, My Trading System Idea is the following - - look to buy if the Bias is "BUY" and look to sell if the Bias is "SELL", pretty obvious, in general. How to go about executing the buy/sell orders is a different story because the current story is about figuring out this aforementioned Bias. How do
To keep things simple and rather than having to change some of my EA settings each time i change time frame, I was thinking of setting up some presets that automatically applied based on the _Period value. I don't know if i have taken the correct approach but i went down the path of multi
Hi All, I have put together the script below to open a new pending order with the same comment and magic number of an existing one. The script seems to be working fine most of the times but occasionally it will not open any order and there are no error messages are indicated in the Journal. Any
i developed this EA and it is working fine but when i wanted to optimize it for best parameters it was telling me 84 passes done during optimization results discarded 84 insignificant. please i need help with optimizing my EA thanks guy
hey guys, i have following simple code i want to write with buy sell as iam newbie to this language learning to code from very basic..... i have this amibroker code written by me...just want to write in mt4 language. i want signal on every candle so iam not using exrem function of amibroker Plot( C
Hello, I have a crossover ea of 2 EMAs, but what I need is that when the 4 period ema crosses the 100 ema the command 50pips will open after having crossed, currently the robot that I have opens it immediately, I made some modifications using a double variable called Preciobuy and another
I created this CCI and EMA EA and i compiled it and there was no error only for me to backtest it and it seems its not backtesting at the same time its not giving me any error in the journal. The EA buys when CCI is above level 0 and price is above EMA. please help guys
I can set Moving Average Levels on my charts in the dialog box settings, so how do I program the MA Levels into an EA lines of code? To Buy when Price is between the MA Level values of up +20 and +40. To Sell when Price is between the MA Level values of down -20 and -40. Standard Moving Average...
  Counter Question  (2)
Sorry to bother you, but are these the same or is there a time when the're not? int counted_bars = IndicatorCounted(); if(counted_bars < 0){return(1);} counted_bars--; versus int counted_bars = IndicatorCounted(); if(counted_bars < 0){return(-1);}
Hello, I have a small but really frustrating problem with dividing. The Indi has many-many arrays and works well, but now I wanted to change the base of the arrays. The old one was the RSI, now i want to change into Daily % change ( or candle, because I want to see it on every TF). So, I wanted to
hi every one I write an expert that put 3 buttons : SELL BUY CLOSE I want to put these 3 buttons into a panel or window that I can drag them together can any one help me Best regards Neda
Hello everyone, hope everyone is doing fine, I am not sure if I posted on the right place, if not I am sorry I can delete it or remove ! Title says it all, I have .mq4 file thats a EA, when I add this file to Expert Advisor it just works fine but I want to make it to .ex4 file I opened it with Meta
Hi, I have a Huawei Matebook E, ARM version of windows 10. Until some weeks ago MT4 and MT5 had been working perfectly. I was forced to accept an update (maybe about 2 months ago), then suddenly all my MT4 stopped working. I have 3 brokers and all of them stopped working. Metatrader connects , and
I'm experiencing a very strange phenomenon. I developed an EA which runs once per bar, since it uses data of the last finished bar. During backtesting it behaved strange, so I stripped it's code to the following: datetime LastCoreTime; int OnInit() { return INIT_SUCCEEDED; } void OnTick() { if(
I have finally got an EA working and taking all winning trades. it dont trade often but when it does it wins. However I am using a high stoploss and I dont know if its taking into account margin. This would change things in the real world if I couldn't cover my margin waiting for the take profit to
Playsound in MT4 MQL4 has a bad error: Playsound does not work inside of loops. .. Playsound ("catsway"); // works well for (i=0; i...; i++) { if (i==...) // about once per hour { Playsound (dog.wav") // never works } Who can help me with an idea or better a workaround. Please send me an
Hey all, i've written a small code and all is working but this condition is not, i don't know if i have coded it wrong or i'm missing something if you can help me RSI = iRSI(NULL,0,RSI_period,RSI_applied_price,1); if((iBarShift(NULL,0,SignalCandle) > 0) && (isTradingAllowed())){
Hi, I have been checking some youtube videos about Backtesting. Not just to learn how this can be done (I still don't know it) but particularly to find out whether what I want can be done with Backtesting or not - if my desire is even possible in MT4. Although I have zero development knowledge and
hi i used CHARTEVENT_OBJECT_CREATE to change color and the name of every trend line user draw on chart and i used a Counter to add number to a origin name and put it on trend line but it's cause a endless loop and Counter don't stop Counting
  error 130  (3)
I have been getting this error and I cant seem to figure out the cause. I have been trying for the last 3 days to figure it out. I assume its because of my send order operation so I have adjusted everything I can think of. Nothing seems to stop it from appearing in my journal during backtesting. one
Hi all, I am really new to mql4, coming from NT world. I downloaded a custom indicator which plots 2 lines (white and blue). All I want my EA to do is to go long when white crosses blue and go short when blue crosses white. However, I want it to be done only if cross happens after the one-day candle
hello guys please i need your help, i developed this EA that uses CCI and moving average filter it was all good but my problem now is that it opens trade on every bar for example if you place it on a 1H chart it will open trade on every 1 hour. please how do i prevent this from happening. Let me
Hi, first time this has happened to me but the charts for USDJPY , NZDUSD , AUDNZD do not show on screen. The charts for the other pairs I trade are fine. The MT4 platform is via IG broker. The usual MT4 page is there but all I see in the chart area, at the bottom, is the tops of my count numbers
This website uses cookies. Learn more about our Cookies Policy.