MQL4 and MetaTrader 4 - page 9

Hello everybody! I have a problem: I need to make my EA open a trade only when there is no other trade open on that same symbol, and I want to use the same EA on multiple symbols. if ( (MarketInfo( Symbol (), MODE_SPREAD )<= MS) && ( OrdersTotal ()== 0 ) ) OpenTrade(); This is the filter that I
I am trying to count the number of bars while a condition is met. In the chart below I want to count the number of red bars (when aray is < 0). I want to make an EA but first I am trying to visulise it to ensure its working correctly. I have tried to plot it in an indicator which has added another
  ADX alert!!  (143   1 2 3 4 5 ... 14 15)
Hi, Can anyone help me with this favor? I am looking for an ADX that will alert, when a cross between D- and D+ occurs and vice versa. Sound alert that a cross happened, that will be appreciated Thanks
Hi, I am trying to use the mtf_ma.ex4 indicator to work in an expert advisor, but it does nothing. The expert advisor works when I have normal iMA moving averages and I tried the hull moving average indicator with iCustom and that works also. The iCustom for mtf ma looks like this: double
Hi All, I have successfully written the code to paint the zone in between of two moving average channels with 2 different colors. However, I am still unclear about how it actually works. For example, if the array are arranged in the following sequence, then the following chart would produce
Hi all, When I run the code below in MT4 tester, the stoplosses and take profits in general seem to be okay, as do the date ranges for executing the strategy. However, the orders don't seem to obey the RSI criteria, could someone please help? It is like the RSI condition is being ignored and a trade
I can not trade in MT4, then I ask them. they said :"Sorry, we can no longer provide you with trading services due to the decision of the trading desk due to commercial reasons." They asked me to withdraw funds and cancel my account. Why do they do this
Hello, I hope you are well, I would like to store my price in a variable and execute an order if the price reaches x value, how can I write this please? Thanks in advance
Hi guys. I'm trying to read latest line in latest log file. So could anybody help me?//+------------------------------------------------------------------+//|                                                        Test1.mq4 |//|                              Copyright 2019, R.T. Software Corp....
Hi, I wanted to modify an order using the command in MQL4 OrderModify, but, I think I might have not understood it correctly. My idea is to modify an order that is already ongoing, meaning that it has been already triggered. So that, for example, I can increase the TP by some points if the market
Hi All, Need help with my MT4 can not open any product on the market. How to fix it
how do i add brent oil in mt4 thanks
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...
Is this the correct implementation of OrderClose () ? for ( int ii= 0 ;ii< OrdersTotal ();ii++ ) { if ( OrderSelect ( ii, SELECT_BY_POS, MODE_TRADES )) { if ( OrderType() == OP_BUY &&
Hi, One tool is being developed for MT4 and it analyzes most recently closed two (2) candles. The tool, as one of several features, has to correctly decide whether the most recently closed single candle, so the latter one is the latest two closed once, is so called indecision candle (Pin Bar) or
My MT4 will connect for 5-10 minutes then show no connection every 5-10 minutes. It does this all throughout the day. I need help. I have uninstalled and installed MT4 and rescanned server list but it continues to do this. thanks
Hello, can someone help me? I'm newbie on mql programming, how to run script with prefix and suffix pair? This script has been run successfully on basic pair ( no prefix and suffix). Thank you #property copyright "Copyright 2021, MetaQuotes Software Corp." #property link "https://www.mql5.com"
I am trying to get this code to work in a way that it will allow only one buy and one sell open at any time. I can not get it to acknowledge the script to limit the numbers. I was able to get a small code to restrict to one open trade in total to be allowed. But I am wanting to allow one sell trade
I already found the problem, ** delete this thread *** Update: I still found a problem that I can't get the right price reading from the indicator
I have five orders on the chart, I am making a loop to select order to make some modification, it did not work so I print the order ticket along with its index to check, and I have noticed this when these 2 line where here the it prints as follows for(int i=0; i<OrdersTotal(); i++) {
Hope everyone is having a fantastic day! Can someone provide a brief tutorial on how to add a Pocket Options account to the MT4 platform? Thank you! Johnny
i know how to calculate ticksize double Ticksize = MarketInfo( Symbol (),MODE_TICKSIZE); and lot size double Lotsize = MarketInfo( Symbol (),MODE_LOTSIZE); but how do i calculate the cost of one contract? and the smallest possible change in profit when you are in trade
Hi all,   This is my first post and I did search for the answer extensively over the last week.   The problem is, my EA when attached to a chart will execute a buy/sell order almost immediately, because its buy/sell condition has been met. However, this could be halway through or at the end of the...
Recently installed MT4 and at present time, the buy;takeprofit and stop lines are not on the chart.  How do I get these lines on the chart.
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 just downloaded the new MT4 app on my mobile, because the old version didn't work anymore. My question is: I noticed that the new version of the MT4 app will give a sound with all the notifications including the messages from the 'community utility news'. I don't want that to happen, because I