Download MetaTrader 5

MQL4 and MetaTrader 4 - page 246

To post a new topic, please log in or register
/+------------------------------------------------------------------+ //|                                                     buyOrder.mq4 |//|                                                       David_kdcp |//|                                                  falavaspace.com...
Hi   I have an alert in my indicator when it triggers its giving me the message multiple times? Here is the code, I would just like the alert to send once please.    if (Time[0] >= TimeCurrent())      {         AlertStatus = true;         if (AlertStatus == true)...
Hi, am I right that we cannot have this kind of pointer structure? struct _S{ int i;};_S p, arr[];ArrayResize(arr,5);p = &arr[2]; // compiler error: '&' - operand expected  test_OrderArrray.mq4     Is there another way than using a function (that requires calls by reference)?
Good day, Please i want to know how objects (Buttons,labels,lines etc.) can be enable or made to work in strategy tester visual testing. There is a product in the market which uses the functionality and i want to know how its done. Tried asking the developer but he said its a secret. Here is the...
MarketInfo(Symbol(), MODE_POINT) will return gibberish when expert is compiled with '#property strict'? I just turned again into playing with mql and got into this issue. Anyone know anything about it?  [UPDATE] it appears the same when using Point property. This happens to me in strategy tester....
MarketInfo(Symbol(), MODE_POINT) will return gibberish when expert is compiled with '#property strict'? I just turned again into playing with mql and got into this issue. Anyone know anything about it?  [UPDATE] it appears the same when using Point property. This happens to me in strategy tester....
pretty new to programming.  i imagine this is a pretty common thing, so just wondering if anyone can save me the work. thx.
Is there any guidelines for adding text with an indicator such as count up, count down, use an array, anything? the array could be substituted with a count of texts but either way it seems they must be reset on each tick. how is the best way to place texts and not have to update those not on bar 0...
Hi guys,   I did some programming for metatrader before but it was a few years ago. Now I am back and I have MT5 and I want to build a robot for myself for arbitrage trading. But first I just want to test and get all required values and then use them in either a graph format or just a...
·        If you don't have an alternateemail address listed on your Google email account, and you have been trying tosign in to your account, please stop trying to sign in for 24 hours. After 24hours, visit the password-assistance page andenter your username. You should now be able to reset your...
Hi guys Please can someone point me in the right direction here... I have created a simple indicator using Wingding Arrows which are nested under an OBJ_LABEL and anchored in CORNER_1. Obviously, there are 3 different iterations of the arrow UP (241), Sideways (240) and Down (242). My problem is...
Hi all, i have one problem with this code:   void write_data(){  int handle;  string filename = Symbol()  + ".csv";   handle = FileOpen(filename,FILE_CSV|FILE_WRITE,',');  if(handle < 1)  {    Print(" #", GetLastError());    return(0);    //FileClose(handle);  }    FileWrite(handle, "DATE","TIME"...
Hi all, I'm very new to Strategy Tester and have a hopefully easy question. I'm testing a simple EA that closes trades based on fixed stops and targets. If you note my optimizing variables below, I'm testing a stop every 4p from 14p up to 40p (7 passes), and a profit every $4 from $10 up to $130 (31...
This script prints only up to the third '7' digit on the OBJ_EDIT - thus limiting the length of CEdit and is a bug, or I miss something?   //+------------------------------------------------------------------+//|                                                    testCEdit.mq4...
Hi, I am still learning coding and need some help. I am trying to create an EA where an order is opened once the criteria is met, in addition it also opens a Limit order a certain amount of pips away from the current open order. I want the pending order to be removed/deleted once the open order has...
I can't launch Cherrytrade.com from MQL4 even though I put my necessary credentials for cherrytrade.com. What am I not doing in order to launch Cherrytree.com?
We are attempting to convert a WMA line used in OANDA's FXTrade platform to MetaTrader 4, but the code is not producing an accurate line. How do we convert a WMA30 to a corresponding SMA, EMA, SSMA or LWMA? Our EA code references LWMA. Any thoughts? Thanks. SM 
I want an EA to run so that at the creation of a new bar the EA iterates through 28 pairs and checks the value of a custom indicator for bars [1] & [2] (i.e. not the current bar that has just been created but the previous two bars). Unfortunately as I iterate through the pairs it seems that some...
My EA placed order at the price of 135.00 on EURJPY. as per conditions EA must close 50% of lot when price reaches 20+pips profit, when EA tried close the order spread difference become 2.5 pips to 50+ pips. so EA closed the order with loss of -33pips(Ask Buy Difference in spread). How to avoid such...
You know there are O/H/L/C prices displayed on every chart as default. However when I display the Bid/Ask prices on different brokers, I found the Bid price isn't at the same step as the close price on the chart for a few brokers and it is behind the chart price. It is good on most brokers, but...
There is some explanation on this error here and here. But still I can not figure it out.. So please check out this code on an indicator called RMO, "Rahul Mohindar Oscillator". Coded not by me, but a great coder on another forum.. But after all the updates and changes to MT4 this does not work any...
I would like to add password from decompiling, Expiration Time and User account in a indicator . I've read the article https://www.mql5.com/en/articles/359 , but I can not make it work.Can someone help me? The indicator is attached. Thanks!
Hi I'm trying to create a custom indicator, and I'm having trouble with what I need to do next in my code. There is obviously a lot which I need to add and perhaps some that I need to leave out. However, I'm finding it difficult what I need to do next, at the moment my indicator compiles with no...
 Hi! I don't really understand why mt4 should decide which timeframe i need to have. take a look at forextester 2. there i can choose my own time frame. i don't need to download a indicator. mt5 is better but the same problem. no custom timeframe. Ola 
I would like to be able to subtract 2-3 hours from the current time. What's the formula to do this?
First - sorry for bad English I am a beginner   I have two problems When I click to Button, how to call function (or, I do not know :) * procedure) and how to call the value of the radio button attached to the files thank you very much
I have a question. Is there any elegant way of how to resolve a current history folder name, in which the .hst files are accessed if no internet connection is open? Since there is another bug with FileOpenHistory() (I mentioned earlier in the forum), I have to use the Windows API for updating...
I have an indicator which will send notifications when candle patterns are detected. On only want it to run when the code sees a new candle as formed. I record the current candle open time to a file. So if the indicator is closed, and re-opened it knows where to pick up from. Here are the functions...
With the code below the instructions are as follows : After 10 bars it opens both a buy and sell pending orders each 200 points from the close price at 10th bar. Then, when price closes higher than one of the pending order price points it closes the opposite order.   // Input variablesinput int...
Solid mu fu joins a floor board and common sense of choose and buy: When consumer is bought should pay attention to the following aspects: 1, the building materials supermarket or advice to the formal professional market buys a floor board, in general, the quality of the WPC Fence...