MQL4 and MetaTrader 4 - page 182

when i use the iCustom function to fetch the values from the data window and alert the values , I get the values.. But when i compare that values to Open or Close function it doesn't take any trade according to my condition //+------------------------------------------------------------------+ //|
if ((OrderMagicNumber()== 0 )==(OrderType()==OP_BUY)) { OrderSend ( NULL ,OP_SELLSTOP,ls3,tpSell, 10 ,slSell,tpSellStop, NULL , 1 ); } I want my EA to only do the OrderSend if the OrderMagicNumber 0 (a pending order ) is fulfilled. I can't seem to make this work. I also tried this approach but it
how do I change an EA variable that is in several assets? I'm gonna explain: I'm going to put the EA on several assets and I'm going to set a target and I want to close all orders when I get to 10 dollars, I need to leave the target on the dashboard and when I change the target to 12 dollars I want
Hello, I need help in MQL4 , what should I use in (OnChartEvent) to be able to move two lines at the same time, while the mouse button is pressed. EXAMPLE: imagine two horizontal lines, while I move one up the other moves down AT THE SAME TIME, not just when I release the mouse button. thanks
Hi Team, Please add % Change to Market Watch, we have Bid and Ask but it would be nice to have % Change as well so we can know in real time what % the instrument is rising and falling Regards Sam
  Unbalanced Parenthesis  (16   1 2)
I know it's boering to find but I have unbalanced left parenthesis error in my script here is the module I've been working on - I know there is not ticket management to know witch ea does the trades or manual trading that's how I want it -This is an order management script to do sorta a martingale
I'm attempting to create a simple panel on the chart with an EA. It's my first time to create one by the way. My first step was to create a simple rectangular object but it doesn't seem to show up in the chart when the EA is initialized. I could create buttons and labels but the rectangular object
I am new to forex trading and I have been trying to familiarize myself with the features of the MT4 platform. However, from the start till now I have been unable to execute a trade. When I click on the new order tab, the following attachment is what I always encounter. It would be great if i could
double FirstOrderInfo(string Info,int type =-1) { for(int i =OrdersTotal() -1 ; i>=0; i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) if(OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber && (OrderType()==type ||type==-1)) { if(Info=="Type") return (OrderType()); if(Info=="Price") return
I wanted to know if there were shortcut keys specific to strategy tester functions: start/stop testing PAUSE testing I'm particularly interested in the pause testing shortcut, without having to click the mouse.
hey every one i want if conditions is true , open " just " one position(ex one buy) and when condition is good for sell open just one sell. i would be really grateful if you could help me
Hi, I want to install MT4 so I click "MT4 download" and it gives me "mt4setup.exe" as expected but running this installs MT5. Any ideas anyone? Thanks
Happy coding. I'm new to Mql4 and coding in general, but I'm learning at a rapid rate via the mql4 documentation. My question refers to Methods inside of Classes via "public" access. As referring to mql4 documentation, there seems to be no listed source on how to properly instantiate a Method into a
[Deleted]
Hello I have a SendMail function set up in an MQH file. Having added to the content of the email body, compiled it and initialised it, the updated contents of the email body is just not showing, it's as if its completely ignoring any changes made. The EA file is connected to the MQH file via an
Good day, I need some help please. I want the button to stay the way it is when the time frame is changed. #property indicator_chart_window #include <Controls\Button.mqh> CButton TrendButton; int OnInit () { TrendButton.Create ( 0 , "TrendButton" , 0 , 1460 , 62 , 1540 , 82 );
i have vps linux centos Operating System how to install metatrade ?
with MT4, I'm trying to create a custom indicator that, once I placed RSI indicator, put on it also the MA indicator. Manually I add RSI chart indicator, then 1) I drag&drop MA indicator and select Apply to: First indicator's data and then I click OK. 2) Then I reopen in editing this MA and change...
On Strategy Tester I have a hard time accessing global variables from an EA calling a custom indicator that set them , Is it supposed to work
//+------------------------------------------------------------------+ //| tst.mq4 | //+------------------------------------------------------------------+ #property version "1.00" #property strict void OnTick () { barCalculations();
when I try to open metaeditor the platform locks up for about 30 seconds then just continues running. Can someone solve this problem? Thanks for your help
In 1335 and previous versions my EA compiled and ran fine on the terminal with no errors while running on compiling. Now after updating today, when attempting to add my EA to any chart I get 'global initialization failed' with no compile errors in build 1340. I've tried wiping the installation
Is this a new ploy by MetaQuotes to force everyone to MT5? For what it's worth I'd love to only have to use MT5 and not 4, but many BROKERS don't support MT5 yet, and that's very frustrating. Dear MetaQuotes: if you want us users to all to move to MT5, please figure out how to force all the brokers
[Deleted]
i was having this problem when OptimalLotSize runs it give me a big lot size for btc chart. Instead of a optimal lot size which is somehwere around 0.01-0.05 it gives me a lot size of 84+. So if any one got a answer to this would apricate it alot. BBStrategy code
  SymbolName/Symbol. OrderSend  (12   1 2)
Hello everyone, I'm experiencing problems with the my first part of the code isn't interacting with the second part. How could it be possible to change the String to a OrderSend? // First Part  string Pair;                       // New Symbol  int New_Pair =11;                  // EUR/USD is the...
Hi everyone, I've a strategy using a supertrend indicator. This supertrend indicator have 2 buffer which is supertrend up and supertrend down. // setting up supertrend indicator double supertrendUp( int shift= 0 ) { return iCustom ( Symbol (), PERIOD_CURRENT , "SuperTrend" , 12 , 3 , 0 ,shift);
  Array sort help  (3)
Hi All, I am a new coder since 2 months. i want to ask a question. i want to ascending and descending sorting arrays according to condition. i found this example in mql4 documentation. //--- example of sorting of one dimensional array double num_array[5]={4,1,6,3,9}; //--- now array contains values
Hello cracks, I try to modify the indicator zigzag arrow (or just zigzag) who is awesome for my needs. Maybe you have an idea, as I am lost. My intention: To place buy or sell arrows on certain conditions for example: if(Close[i] > Open[1+i] //Candlestick Close > Candlestick Open Close[1+i]
Hi, I want to know how to make a new line Text label. ObjectCreate ( "label821" +Time[ 0 ], OBJ_TEXT , 0 , TimeCurrent (), High[ 0 ]+ 300 * Point ); ObjectSetText( "label821" +Time[ 0 ], "ABCDE" +profit, 10 , "Helvetica" , Yellow); It shows ABCDE But I want to make is show A B C D E Is there any
Hi all, I have encountered one common problem with some brokers’ mt4 platform on PC. The issue is they tend to hang during first launch of the platform after installation (stuck where a window would show the server selection with the mt4 on the background). The only way to shut the mt4 is with task