MQL4 and MetaTrader 4 - page 193

Hi there, I have been trying to test my strategy, but it is difficult to test directly on historical data. Is it possible to test in a more controlled environment? I have the impression in some articles are used "mock" currency (a currency made up with controlled data). Am I wrong? I'm using
Hello, RoNz Auto SL-TS-TP trailing stop stopped working. Does anybody know if any recent MT4 update changed the Trailing code sintax or something
Can "return" operator exit loop in user-defined function and return the required value? or there is no way but to use "break" operator to exit the loop and then "return" operator to terminate the function and get the required value? Thanks
I'm working the course of Jim Hodges at the moment he is teaching how to use magicNumbers, my question is there a better way to do it or is this the normal way(generating Magicnumber)? //+------------------------------------------------------------------+ //|
  T3_dpo  (17   1 2)
Hi everybody, I'm posting this good indicator. Regards MFX
Hi, I am new with MQ4 and I've tried to put this to work but there is not way to read a second NEW candle. I've being testing in a range of 2 weeks, and the script should look for a new candle every 5 minutes (candles of 5 minutes period). I really don't know what I am missing. Here you will see
I'm trying to count how many times a conditional event occurs. But when I test it, it gives me unrealistic numbers. I don't think I am coding it correctly . Need help for(i=0;i<Bars; i++) { if(Close[i+1]<Close[i+2]<Close[i+3]<Close[i+4]<Close[i+5]); x=x+1; Comment(x); }
  Problem with Parabolic EA  (12   1 2)
hi all Please help, i have a problem with my PSAR EA. The problem is it opens properly as i want it to, problem is when it closes it opens another trade. I would like for it to open a trade & close THE TRADE that's all. I know there's something missing. I tried searching on the internet but no luck
Hi, I would like to code (at least try to) an indicator that could give me a hint regarding the volume of sells/buys during a current bar. I know how to code in mql4 but I would appreciate ideas that could help to get somehow the desired result, if that is even possible. What is needed? where to
The MetaTrader 4 platform update will be released on Friday , March 19, 2021. This version provides error fixes and platform stability improvements. The new build will be available through the Live Update system
Hi i need help on adding an alert sound and notification to send to phone to this MACD when the histogram bar crosses the zero line to negative/positive. Can someone please help
Hi, I'm a complete beginner so apologies in advance. I have created an EA based on a consolidation breakout indicator. Once the conditions are met it sends two pending orders at the high and low of the consolidation. Once one order is entered the other should be cancelled and a trailing stop tracks
Hello, I am beginner at coding, and i dont know how to make this: Open one trade at Tuesday at 10:00h, and close it at Friday at 22:00, if still open? Buy or Sell are based on some indicators. Can somebody help me
#import "shell32.dll"int ShellExecuteA(int hWnd,int lpVerb, string lpFile,int lpParameters,int lpDirectory,int nCmdShow);#import......int init(){     // open init file      ShellExecuteA(0,0,"C:\\Users\\OSR2\\EA2.bat",0,0,SW_SHOW);...The above ShellExecuteA call only works the first time the EA is...
Hello community, i m using the custom indicator Alert(iCustom(Symbol(),0,"Heiken Ashi",0,0,0)); can any one help me how to find out the Heikin ashi candle Open,High,Low, and close from the using the iCustom Indocator for the heiken ashi
  Custom symbols  (6)
Hi I've set up MT4 & signal, and linked to my broker So far, so good. I'm running a spread betting account, so symbols are all suffixed _SB GBPJPY_SB etc I've created custom symbols to match, without _SB Do I also need to map the broker's _SB symbol to the custom pair, or will signal trades sync up
  Unique groups of numbers  (22   1 2 3)
Say for example I have a range of numbers I can use from 1 - 10 ok. What I actually want is unique sequences of that range, ie. 10,9,7,8,4,6,5,1,3,2 2,1,4,3,5,6,7,8,9,10 I know you can shuffle arrays but how do get uniques shuffles with maybe a seed number like srand to create random groups of...
hi everyone so here is the problem I wrote a Multi Time Frame EA that can open orders in any time frame but the problem is my code wanted to tell EA check if any order was opened before if not Send Order () if there is order already : check how many second has passed since last order open time then
  One Price SL TP  (2)
hi, i want EA to calculate first a zero point (a point where sell order's and buy order's SL value and TP value will be zero) from which it will calculate number of positive pips named as "ZEN". Below is my program where it takes ZEN as price, and places on all orders in either SL or TP form
I am trying to return a value from an indicator buffer via iCustom, but I keep getting the error 'cannot open file': '2018.09.17 11:09:53.368 cannot open file 'C:\Users\ryanw\AppData\Roaming\MetaQuotes\Terminal\1DAFD9A7C67DC84FE37EAA1FC1E5CF75\MQL4\indicators\ADX & ADXR.ex4' [2]' I have declared the...
[Deleted]
Is there a better way to do this. The built in function ArrayInitialize() does not work with string arrays. I want to be able to test a string array to see if its elements have been populated with anything other than an empty string. I also want to initialize the array, since they are static, at...
It has a good win rate but sucks cause it doesn't have a sound alert signal when the arrows appear please help
On my indicator that I am making data is only displayed for the most recent 50% or so (it varies) bars and then after that it does not display anymore data. Here's a picture showing what I mean https://imgur.com/a/NquoQLo . property indicator_separate_window #property indicator_buffers 1 #property
Hi friends, i have moving average 20 period. I want the have data of 5 period before but couldnt get the value. Are there any solution? //" -5 " seen on chart as a visual but EA doesnt see any value :( double ma20_5 () { double ma20_5= iMA ( _Symbol , _Period , 20 ,- 5 , MODE_EMA , PRICE_MEDIAN
  MT4 on 4k Monitor  (15   1 2)
Hi I bought a 4K monitor and am having trouble with the metatrader 4. The taskbar, the vertical bar prices, terminal, etc. appear with a very small font size. It is difficult to read. Can anyone help?
I think I know the answer, I though I would check with those that are more knowledgeable than me just in case someone has a good idea. I'm coding for an Indicator, I want to do something when a Trend Line has been moved by the user, ideally I want to only do the something when the TL has been...
hi guys I been having a problem regarding OrderOpenTime() function this ea runs only on 1 chart ***
  GRAAL is found. Chapter I prologue.  (382   1 2 3 4 5 ... 38 39)
Did you believe it??? ))) If you believe it's good, it means you are not lost and you haven't lost your inner faith that it really exists, as we know its power makes every trader motivate, dig, move forward. I want to give some context, it will be useful so How many people understand the word Grail
Hi all, i am newbie of Mql4, i am trying to write my own code, i want to leverage some result of default indicator, i tried to get them by my coding, but don't why doesn't work. I guess (rates_total) is the result of the indicator, so i created a variable for storage of result: int Awesome_result =
[Deleted]
I'm very happy by the existence of Period_Converter_Opt.mq4 on 'Period Converter Optimized' so that I'm able to convert into my own comfortable time frame. But recently, after my broker shifting the Daily opening time from GMT +4 (opened at 5 am EST) into GMT +3 (opens at 4 am EST)...