MQL4 and MetaTrader 4 - page 269

To post a new topic, please log in or register
Hi, Is it possible to get an alert when any of the symbols in MT4 terminal crosses the 30 level RSI indicator and how?
  Add a Line on EURUSD (11   1 2)
Hello, I have been searching and reading documents to find a way how to draw a line on eurusd chart and the line , which I calculated by using other pairs prices, is the result of my calculation. Could anyone help me how to add this result on eurusd chart as a line ? Thanks.
I know what iHighest/iLowest do but have found that these are quite often hit by spikes in the price. Is there an easy way to ignore the highest and/or lowest and get the second or even third highest or lowest.
Hello all,   I've been developing and trading with systems based mostly on candlesticks. Because I am a programmer, I start coding a Metatrader4 program to help me. I believe it can help more people as the program is very configurable and extensible. Is is still under development and needs testing...
Currently, mql4 can only provide time down to the nearest second for incoming ticks. We use the following function: MarketInfo(Symbol(), MODE_TIME) 1) Is there a different function that can provide millisecond time stamp or can be used to determine milliseconds for tick data coming to the platform?...
Hello all, Facing a problem when coding my simple moving average EA in mql4, just lacking mql4 knowledge really. How do I make it stop the trade when going 30 pips below/above MA, this is to protect from bad trades or negative SMA as I call it (see image). I don't want to use a stop loss. Currently...
The problems noted at https://forum.mql4.com/68999 and https://forum.mql4.com/67275 are still the same - if not worse.  If this one isn't corrected, it will act as an incentive to users to open multiple mt4 accounts simply in order not to have to switch to different chart timeframes. 
I am having a custom indicator which accepts 3 extern variables as input (1)Signal_Type, (2)Entry_DateTime & (3)Entry_Price. With the help of these inputs indicator plots some objects on the chart as depicted in image below.   This custom indicator allows user to edit these extern variables in...
Hello, I need your help. What I want from the EA is that as the Margins arrive to a specific bottom it will stop adding new trades and stop executing. How to do it, Please.
Hi all, I am preparing an EA which uses Partial Close in its logic inside I can save remaining order after partial close with magic number control But now, I have different problem in OrderOpenTime, remaining orders ( generating after partial close ) have different OrderOpenTime() than original...
I am new to mql4 coding. This is my first indicator using arrays and I'm having problems with the object delete function, its not removing indicator after removing from the chart? I have looked everywhere for a solution I can't see how this is not working, does anyone know what needs changing below?...
I've noticed some codes Sleep at the start of a code then Refreshes to update values before continuing with the rest. Is it not better to Sleep at the end of the code? Then RefreshRates is not required? edit: should probably specify purpose: to make sure the code only runs once per second for...
Hi i m beginner so i have some question about EA programming. I want get value from indicator (MA20) and take it into my sql program ,but i dont know way to take its. Advise for me , Thank you   
Is there any standard function to get total closed orders for current day? eg: must count only closed orders count day by day! if there is no standard function available please give me a suggetion to get daily orders count?
Why doesn't the TimeCurrent function print millisecond precision or allow the user to specify whether they want millisecond precision?  It doesn't make sense that the mt4 terminal expert/journal real-time logs, backtest journal logs, and server ping functions have access to millisecond precision,...
/+------------------------------------------------------------------+ //|                                                     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...