MQL4 and MetaTrader 4 - page 1048

To post a new topic, please log in or register
Hi, I am thinking of the following logic: Take the first H4 bar from opening bell, measure the range if range > threshold then enter immediately, else do nothing. What is the code for getting the open and close for the first H4 bar of the day? ( Assume London open is the opening of the day.)...
Hi, I apologize if this has been asked already. The 'search' seems to be not working. Kindly assist in answering my question or pointing me to existing related threads.
How to modify the standard trailing stop code for dealing desk to be used for ecn? This is like the standard trailing stop code that is everywhere. Works for broker that does not charge commission. When I try testing on an ECN broker, some of the stop losses ended with negative profit because of the...
  Help to write some codes (13   1 2)
Hi, I wanna to write a code that start to scan chart in 8 GMT, when price move for example 15 pips in each direction, puts a pending order in opposite direction, i wrote some code but it didnt work properely, WHY? if(OrdersTotal()<Max_Order){ if (h>=8 &&h<9 ){...
Dear Developer, G'day I would like to create very simple Indicators. Due to security reason I would like discuss it personally. If you are interested, please mail me with Subject: MQL4 in your mail to raj.dreamjobz@gmail.com Lots can happen, keep charging. Be Awesome, Raj DreamJOBZ.com
Hello all! I hope someone can help me. Following the close conditions from my EA. I want to close the trade after becoms 25 ticks under opening price, but i cant programming because i'm a stupid beginner..... Who can help me? Thank you so much for help!!! Best regards dsl void CheckForClose()  {...
pls i need a code for my EA to close all trade 18:00 on Friday and stop tradeand open 2:00 on Monday. also i want the EA to calculate a particular percentage of free margin as lot for every trade. i want u guyz to help me with these codes pls. thanks in anticipation
Hi there I am trying to modify a Pivot Point indicator which maps pivot points on all timeframes. The particular methodology I wish to adopt uses values from the prior 3 periods (eg previous 3 weekly bars for Weekly Pivots). The original code in the pivot indicator (for weekly values) used this to...
When I search for anything on this site (for example: https://www.mql4.com/search/profile) I get a message "Your search did not match any documents". Can anyone tell me what I am doing wrong, or, is the search engine faulty.
It is possible to get Rebates on each Trade when reffered by an IB. These Rebates won´t widen your Spreads! The Spreads will remain the same as an announced on the Broker Website. And the best: You don´t need to open a new account, you can get your Rebates on a existing account! Below is a list...
Hemmat
Hi Is there any way to communicate with an EA by means of mouse or keyboard strokes ? In all programming languages it's a common thing but i did not find any particular command for this kind of interaction in MQL4. I know that some programmers write codes to do some actions(such as close all...
When an order type OP_BUYSTOP is executed, does it then become a OP_BUY or does it remain an OP_BUYSTOP until it is stopped?
The operations are: buy 1,4155; sell 1,4163. sell 1,1453; buy 1,1446. Why they give 6 and 5 points to me of profit instead of 8 and 7, and because do not close me the positions and it changes the values to me varying of the book? Thanks
I've been trading with Open ECry (OEC) for some time. I'm attempting to find a written strategy I can import into their custom trading manager that uses the ADX indicator to trade automatically. I'm being told the code might look something like the following: if DIpos > DIneg then begin Buy ("Buy")...
  Topic close (12   1 2)
Problem settled. Thanks.
Hi Guys, I know that here isn't a place to sell things, however, I'm here to give an opportunity for those that wanna use my system. First I would like to show my statement in my Real account at Tadawul FX broker . The equity started with $487 dollars and now is with more than ~$1200 (255% in 6...
  StrToDouble (11   1 2)
There are news event values(actual,forecast,previous) on dailyfx.com/calendar website that need to be converted from STRING into a DOUBLE in my EA to make a trading decision. The problem arises when other characters(not numbers) are present in the STRING, e.g. $569k or -103B. So when the function...
is there bid and ask price difference among demo account plateform,real account plateform, mini account plateform,standard account and ECN account plateform ?these plateform belong to same broker. which one is faster? is the amount of ticks equal between them in a certain time ? i test an ea on demo...
Hi, I wasted like 5 hours in a row trying to find out how to have the system open and close a position only ONCE whitin a time interval, example from 4 to 6 PM if the condition is met. Tried many pieces of code, I have herebelow what I believe could be the key, but I am feeling that I will waste...
Hi All, This is the result of my EA during 2009-01-02 until 2010-01-02. This is with low risk (start with 0.1lot and up to 1.3lot). higher risk would give a better result. I will appreciate all your "critical" comments on the result.
Hi, I'm using this code to count open and pending orders. It seems that occasionally MT4 will return a value of 0, even though a pending or market order is present. Is there a way to double check my orders or a better way to code that is more reliable than what I'm using? Thanks in advance! int...
Attached is an example EA that calculates a simple moving average using iMA() for a number of bars and stores the values in an array. Then, a Print() call is used to report one of the stored values from the array. Unfortunately, the values do not seem to be there. Can anyone tell me why? Thanks,...
I need an EA that opens a trade when candle reaches certain pips. thats it. variables: pips to trigger Sl Tp lots Magic number. Thanks
Is there any way fr formal parameters to return their value?
var1=MarketInfo(Symbol(), MODE_ASK); var2=Ask; var3 = MarketInfo(Symbol(), MODE_BID); var4=Bid; if var1 always = var2 ? var3 = var4 ? thanks
[IT's SOLVED] The lower Sub windows returning error value because I didn't refresh it when attached. Hi everyone... I have this CI that need to be refreshed when first attached to the chart (refreshed by open it up and then close/attach it again - so it will return the correct value. The problem is...
HI, Can anyone help me add the following script code, so that data into a CSV was imported into columns and cells? //+------------------------------------------------------------------+int start()  {        {      mPrev=m;      handle=FileOpen("Data\\Statement.csv",FILE_WRITE|FILE_CSV,"...
I found candle_Signal indicator in this forum interesting to me i do not know if someone can make it as an EA.
Hi. I have a custom indicator with two arrays with values I would like to display. One will be a line, the other a histogram. Array #1: 10, 15, 12, 18 Array #2: 1.0012, 1.0025, 1.0022 If I place them in two separate indicator windows they are displayed fine, however I would like...
I want use EA to test forex. When I insert a StopLoss parameter (through OrderSend) the client terminal open a position with StopLoss Parameter. The questions are: _If i close the client terminal, when the price reach StopLoss the server close automatically the position? _If the EA is active and,...