MQL4 and MetaTrader 4 - page 6

Hi all. I have recently used ChartSetInteger function to programmatically change sub window height (MT4 latest build 830). Once this code is applied to the chart, then I can't change sub window size manually afterwards. It seems the code fixes the sub window height and even if I drag my mouse...
Hi, I'm currently working on an EA which is causing me some headaches... In the strategy tester the EA soaks up all my RAM, something I've never experienced before - and I'm working with MT for quite a while now. This screenshot was taken while running a backtest. Terminal.exe soaks up alle the RAM...
  Label on H_Line  (9)
i am trying to add a label to my H_Line I have tried OBJPROP_NAME AND OBJ_LABEL, but nothing is quite working correctly. if (TriggerLineTrade== "CA" ) {ObjectSet( objNameDes, OBJPROP_COLOR , clrOrange ); ObjectSetString ( 0 ,objNameDes, OBJPROP_NAME , "Close All" );} or i tried OBJ_LABEL
Hi there, Some very simple code below to illustrate a problem I'm having. I have a very simple class with a copy constructor. The sample below creates a new object and then tries to make a copy of that object via the copy constructor whereupon I get the invalid pointer access error/message. What am
I just need that every time you restart MT4 you don't need to reconfigure it ... I notice that when I restart MT4 the "Remove Script" it disappears! I await reply Thanks
Hello All Im new to MQL4 and programming :) i just started to learn, i need to know how can i write an expert to 1) find the biggest body of last 20 candle 2) calculate the size of body i really appreciate if you help me to learn :) Thanks Mostafa
Is it possible to have an EA running that is told to enter a trade if price crosses the trendline named Alpha, for example then manually draw in a trendline later and simply name it Alpha? Could I potentially write the EA so that it enters the trade at that point? If so, does that mean a person
Hello Everyone, Can anyone give me hint for how to get the MACD Histogram values? the bars <Image Deleted>
Hi everyone I want to create a code to check if numbers of bars closing price is below ema line. And this is the code that I came up with. bool PriceReversingDown( int shift= 0 ) { int result1, result2, result3; //result of closing price below ema line respectively to their bar numbers for ( int
Im wondering if its possible to set a delay timer between trades? I'm working on automating a strategy, but there are some times when conditions are met that trades will open and close faster then you can blink. I'm wondering if we can say "For the next 10 bars, do not open any new trades", or...
#property strict #property indicator_separate_window #property indicator_buffers 17 //#property indicator_color1 DarkGreen // Color of the 1st line //#property indicator_color2 Navy // Color of the 2nd line //#property indicator_color3 Yellow // Color of the 1st line //#property
Hi, how can i get info about POSITION_REASON at MQL4 ? At MQL5 the function is PositionGetInteger ( POSITION_REASON ) i dont find the function at MQL4
Hello to everybody, I am getting mad in dealing with array passing to a function. I have defined a function called clear(), with the following prototype void clear(string &[],int); and defined in such way: void clear(string &myArray[],size) {} But when I call the clear function  string...
I need some advice for the below code if you please, 1- for some reason, I get a note of "array out of range " in Mt4 expert journal 2- although Period_MA is external variable and I set it to 20; but when I am testing my code by changing for (x=i; x<i+Period_MA; x++) to for (x=i; x<=i+Period_MA ;
Hi I want to make a stoploss strategy using the lowest price of numbers of bars (in my case 5 bars). this is the code that I came up with: int highestPriceShift = iHighest ( Symbol (), PERIOD_CURRENT , MODE_HIGH , 5 , 0 ); int lowestPriceShift = iLowest ( Symbol (), PERIOD_CURRENT , MODE_LOW , 5
Hi everybody, I have an indicator that draw arrow up and arrow down as object on chart, I want to program an EA that trades by these arrows, I have two questions: 1-How can I find when these objects drawn?(how can I detect these objects?) 2-How can I find out difference between arrow up and arrow
Hi, I am back with another question. Do you have any solution to close all stop orders ? I've been searching for a while but still haven't found the answer. below is my Pseudocode if ( OrdersTotal () < 2 ) { //close all pending orders } Thank you very much for spending time to help me
I will be happy if MT4 supports UTF-8 source files. Currently, MT4 build 6xx supports system locale codepage encoding and UTF-16LE. UTF-16LE is locale-independent encoding, but has the following problem: Some tools recognize UTF-16LE files as binary (ex. git).Not only tools but also some of web...
Hi guys, I need this indicator to have an alert every time the bar changes color. (one color is bullish and the other is bearish), attached I leave the indicator, if you can help me <Decompiled code deleted>
Hi A question for MetaTrader Gurus. For a particular symbol, when a trade is closed, I would like to open the new trade with a 15 seconds interval. Any code snippets please? I would like to express my gratitude in anticipation. Thanks and best regards, Long John Silver
can you create alerts , the alerts in alert tab in the terminal i mean , using scripts/indicators
Hi, I just installed my <Deleted> EA. The balance is ready. The smiling face of the EA is up. I checked the expert tap and it shows the EA is initialized. I checked the Journal tap and it shows the EA was loaded successfully. Anybody knows what's going on? Do I have to wait for a few days for the
I am a beginner, sorry for the very basic questions. I have an ea I purchased and installed on my mt4 platform. I'm going to switch broker soon so will I have to reinstall the ea or can it stay where it is now? I also received another ea as a gift with my purchase. It was sent in my personal
  Expert Adv. Help  (6)
Hello everybody; i have a robot in my hand. i want to trailing stop in system but i cant do it. is there anyone who can help me? Thanks... //| day open_baris.mq4 | //| Copyright 2014, MetaQuotes Software Corp. | //| |
Hi guys, Today I started up my computer and noticed that my accounts where gone. So first I setted these up again. Next I noticed my most important indicator is gone. So I went to Indicators->Market and tried to add the indicator I use most often. However, I can't attach it to any chart, it just
My EA ran without any problem all day, opened and closed the trades as it should. But, after some time it gave the "Not enough rights" error and did not open the trades. See picture of the Journal tab. What is it and why did happen
Hi, I tried to get the open price of an order so that I can base on that value to place a new order. For example 100 pip away from that price. I use the OrderOpenPrice() function but the value returns 0. Please help me with this issue. Here is my code: if ( OrdersTotal () < 2 ) { int
  Need help  (3)
Hello traders Maybe somebody have Adc Oscillator indicator MQL4 source code
I am trying to count the total lots for all open Buy trades but the EA keeps on going through the loop and does not stop adding the lots together. So in the first round it calculates the total lots correct but then keeps on adding that amount of lots over and over. I want to stop it once it has gone
  Update Array  (1)
Hi. I'm currently working on my first EA and I have grown pretty desprate. I actually want to fill my array[0] with the recent indicator value and have the previouse value move to array[1]. void OnTick () { if ( OrdersTotal ()> 1 ) return ; double arr[ 2 ]= { 0.0 , 0.0 }; for ( int i= 0