MQL4 and MetaTrader 4

To post a new topic, please log in or register
The MetaTrader 4 update will be released on Friday, January the 24th, 2020. The update provides bug fixes and stability improvements. The new version will be available through the Live Update system
hello All , need help : how to separate the HLINE showing in one indicator? one group line is only for AUDUSD and one group is only for AUDJPY Thank you in advance best regards //this HLINE from here is only showing for AUDUSD
hi guys i try to compare the time frame for exclude 3 type of time frame but not work i tryed also with use a second like but nothing , whats wrong ? sinput ENUM_TIMEFRAMES TimeFrameChoice= PERIOD_CURRENT ; // Timeframe void OnInit () { Print ( "il periodo e questo " +TimeFrameChoice); if ((
I have a EA and I can run it on multiple charts. But I want only one order is opened at a time and until that order is closed, I don't want any new orders. Can anyone help me with this in Mt 4 platform ? Thank You in advanced!!!! Please Please Please
I've make a custom indicator, and for some reason the output is different when I am using it in the strategy tester than it is when I just drop it onto a chart. I'm attaching a screenshot showing the indicator twice in the same window. The top one is what I got when using the strategy tester (visual
  Heiken Ashi (4)
Hi, I have been reading about the indicator and confused as how to call the indicator correctly. I have seen the first instance (below) but not sure the significance of the colors The second statement appears to work fine (i is the shift). Heiken Ashi is the spelling I use and reflect the indicator
Hello. I will ask for help. Why this script does not place orders. //+------------------------------------------------------------------+ //| Poziom i spadek.mq4 | //| Copyright 2019, MetaQuotes Software Corp. | //|
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?
Hi, I am running an exercise to close a position 20 candles after a MA Crossover . The code is made of 3 blocks, the 1st to open the trade, the 2nd to count the bars since the last MA crossover, and the 3rd to close the position. This code doesn't work and the position is closed immediately
  Coding help (2)
Hi there, i have created EA but some reason it is now opening any trade, any suggestion? how to sort this out? I have attached EA and indicator
Dear all, I am unable to get the iMAOnArray work as it's always returning either 0.0 or out of range on me. Does anyone know why the codes as per screenshot below always have 0.0 output
Hi! I recently created a EA that sends push notification when certain patterns occur. However, they are sometimes (not always!) getting sent out late (to my iPhone), meaning 5 - 20 minutes late, which makes it useless. When I try to "test" the push notification in mt4 I receive the alert instantly
I've create a loop that calculates a previous date and then the iBarShift from this, but it doesn't seem to work) what am I missing? for ( int r = 0 ; r <= 150 ; r++) { datetime AfterMidnight = StrToTime( "00:00" ) - ( 3600 * 24 * r); int MidnightShift = iBarShift ( NULL , 60
If I run the EA on 1 chart, 1 currency eg:AUDUSD only, it identifies the Ordersymbol == Symbol() , When I run the same EA on another chart with another currrency attached Eg:EURUSD on the same MT4 platform (2 currencies running on seperate charts) it returns "false" Ordersymbol doesnt equal...
Is  Metatrader API service free or paid? how to get API service?
hi guys exist some tutorial or simple explae for comunicate MT4 with external program ? example i want create a indicator attach over 3 or 4 cross and if appen somthing in cros send me data in my external program , is possible to do that ? thankz
i have been trying to download mt4 to my laptop but it wont work instead mt5 get installed does anyone know why
Hi, I would like to call functions of a class that come from c# dll in my mql4 program. I have a c# UI and the dll passes data from the UI to metatrader and vice versa. I read some articles from 2007 and 2013 that this is not possible and that I need a c++ wrapper. Since a lot of time has passed
Hi Friends, I've created a custom button and my intent is that when I press it, it creates a horizontal line with preset parameters. May I ask if it is possible to create OBJ_HLINE without any price anchor point so that I can place it on a chart wherever I wish, just like I would with the draw
Hi, I want to pick up the most recent object color. I have the indicator of rectangle. and I can read the color of the object and time of object draw. string name; for ( int i= ObjectsTotal ()- 1 ;i>= 0 ;i--){ name = ObjectName (i); if (ObjectType(name) == OBJ_RECTANGLE ) {
Hi friends, I'm writing a code in my EA to export the opened orders data from my trading account in a single CSV file. Through the OnTick function, with any new tick comes, the EA checks the file to see whether a newly order has just opened or not, and if there is a new opened order that has not
Dear community, 6-7 months ago I was contacted by a lady in China. She convinced me to invest in XAU trading and guide me thru how to deposit money in company account (where she works). I wanted to withdraw rest of my money. I requested from their portal withdrawal request but I can't trace or see
Hi, I am learning programming mql4 as newbie I know only simple basic. but deep advanced that i still not sure. My project is 1) counted total iBar in select Date/Time from Start to End. I able to do this. 2) counted total of range = iHigh - iLow = total range. I able to do this. 3) Calculated Pips
hi guys i have this part of script return me error '!=' - l-value required but why i used it sinput ENUM_TIMEFRAMES TimeFrameChoice= PERIOD_CURRENT ; // Timeframe void OnInit () { if ((TimeFrameChoice!= PERIOD_W1 )|=(TimeFrameChoice!= PERIOD_MN1 )|=(TimeFrameChoice!= PERIOD_D1 )) { if
Hey, I wanna visualize the M5 trend (sma 20 and sma 500) by drawing rectangles on the full chart height. This should be draw for example for the current week. if M5 sma 20 is over sma 500, draw a green rectangle if M5 sma 20 is under sma500, draw a rectangle in for example peach This should work in
Good evening to everyone, I'm desperate. I need to take the color of the candle (heikin ashi), how can I do? Thank you in advance
Hi, Indicators are usually posted on the upper left corner on the MQL5 site. Below the indicator there is a Download button. However, when I press the "download' button nothing happens. Long time ago I could download these indicators, but not anymore. What could be the problem? thanks in advance
Hello, I subscibed to a VPS to automatically copy the trades of a signals but since more than 1 week no trades are copied. In the history of the signal, I saw that trades have been done but nothing in my account. I checked parameters and everything seems ok, can someone help me? Thank you in advance
  MT4 Support (46   1 2 3 4 5)
Hello,  I've read that MetaQuotes will no longer be supporting mt4 after this year. Does anyone know if ea's designed for mt4 will still operate correctly after this year?   Thanks, AJ 
  Is this Normal? (16   1 2)
Never experienced such before. Say we have 2 mt4 indicators both custom indicators. Then you use iCustom in indicator 2 to fetch some values from indicator one for calculations in some function. Issue is when I attach indicator 2 to the chart it seems to plot indicator 1 with all its buffers and
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413