MQL4 and MetaTrader 4 - page 192

I have been trying many ways this is the last one Can you please show me why is wont work ? for ( int i= 0 ; i< OrdersTotal ();i++) { OrderSelect (i,SELECT_BY_POS,MODE_TRADES); { if (OrderMagicNumber() == 001 ) { if (OrderType() == OP_SELL || OrderType() == OP_BUY) {delete_pendings();} } } } //
Greetings, I am new to metatrader and I am wondering if its possible to place manual test orders in strategy tester? This feature have to exist but I can not find it =(
I was wondering if there is any EA that will automatically close all my positions on an MT4 when a specific amount of loss is reached for all. Or maybe any other way I can be doing so? Thanks
Hello, I see how MT4 can be embedded on websites; however, I'd like to do so by offering access to a custom indicator. No trading etc... is needed, it can just be demo with the indicator loaded so that people can go to the site and test it out in realtime without downloading/installing etc... Is
Good afternoon mates. Today I am trying to get 2 pieces of data inside an Expert Advisor. This EA works by averaging and I am interested in that, under certain conditions, the bot begins to close the first trade of the cycle (that is, it is more extreme), and the last one. Before all this, I am
Just trying to place a buy market order. I am following this https://book.mql4.com/trading/ordersend documentation input double Lots= 0.01 ; input int SL= 500 ; int start() { OrderSend ( Symbol (),OP_BUY,Lots,Ask, 3
Write string with FILE_UNICODE flag, as shown in the code, additional 7 bytes are written. //+------------------------------------------------------------------+ //| test_FileWriteString_bug.mq4 | //| Copyright 2021,fxMeter
Looking for MT4 .wav Sound Alerts for FX , Indices, Commodities, very handy if you trade several financal assets on a screen to know by hearing which has hit an entry level
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
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
[Deleted]
  Discussion on MQL4 documentation  (196   1 2 3 4 5 ... 19 20)
I'm sorry, gentlemen, but what is posted in the documentation section characterizes MQL (i.e. the company metaquotes) not from the best side. So it seems to me that as long as there isn't a normal description (much more comprehensive, with real examples) MQL will remain the destiny of the company's
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
[Deleted]
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
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.