MQL4 and MetaTrader 4 - page 109

I have a problem when my EA places a pending order and my trade hits TP. I get lot size (0.01)* 5pips = 0.42 profit instead of 0.50. With JPY pairs its less 0.37 etc. Here is my code below, please help if you know the problem. extern double TakeProfit= 5.5 ; int MagicNumber; int MaxTrades= 0 ; int
Morning All So I have a snippet of code set up to prompt a MessageBox to make itself known at a certain time (closingTime) which is formatted to an Integer on the 24 hour clock, which in this case is 17 (or 1700 GMT). I am aware that the terminal works to EET and that I have to make an adjustment to
[Deleted]
  calculating time difference  (21   1 2 3)
I need my slave EA to calculate the time difference between The master Time and Slave Time. If the difference is more than 10 min. then slave must return(0), Any feed back about the code please.
Hello, I want to take RSI input parameters from user and put RSI on the chart. Does anybody know what codes should be written? Thanks
Hi I have an issue in the below code where some labels do not appear on the chart, and I get different results when I count down or up on the ObjectCreate loop, as shown in the images attached below. Also as a beginner in coding, and just learned to use arrays. This code is part of a huge code as a
I would like to change my push notifications ringtone to something that will wake me up while I am sleeping. Does anyone recommend a software or method that will work with signals coming from an indicator
[Deleted]
Hi all, I would like to program my EA to detect if an object appears (an arrow... put there by an indicator) on the current bar of my chart. Is this possible? Thanks! Shawn
Hi I have a hedging expert advisor running and it has currently opened many trades in both directions. I wanted to know if I switch off the auto trading button on mt4 to stop it opening more buy trades and hopefully it will recover on the sell side. When I switch the EA back on when it's back in the
how do i sequence conditions within a cycle? while ( Bars > LastBar) { if ( OrdersTotal ()<= 10 ) if (Zone1== "sell" ) //signal 1 if (Zone2== "sell" ) //signal 2 if (signal== "sell" ) //signal 3 if (Zone3== "sell" ) // signal 4
Hi i gave my accont to manage to someone, I want to know what ea they used to trade the account as they wont disclose this information. does anybody know how i can find out which ea they used
Hi, I'm trying to make an algorithm which will open all charts in selected template based on user inputs. I have 2 problems: 1) I cannot specify correct path to find proper template 2) Even I'll use workaround to 1) ChartApplyTemplate doesn't work for me. Description for 1) input string templateName...
  Tick Data on MT4  (3)
Importing Tick Data on MT4. On MT4 After checking Tools->History Center, Import-> I see the minimum granularity is minute data. (nothing about ticks) On the MT4 tester I do not see any tick import option either. Is there any way to import tick data on MT4 or does it necessarly require a 3rd party
Hello, I am in EDT, New York, time. How do I change the time on the MT4 charts to my time? If I can't change it, is there a tool/program that can do it? Thanks. 
Why does the Warning "empty controlled statement found" come up when using if (enableCount == true ) within the following code? void OnTick () { double close = Close[ 1 ]; datetime time = iTime( NULL , 0 , 1 ); static int barCount = 1 ; static bool enableCount = false ;
Hello, I would like to calculate the daily profit of one of my EA, my code is: double DailyProfit() { double profit = 0; int i,hstTotal=OrdersHistoryTotal();   for(i=0;i<hstTotal;i++)     {      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==TRUE)        {          if(TimeToStr(TimeCurrent()...
I would like to set my TakeProfit as closing in profit and not in pips. Below is my code closing in profit. for ( int Loop= OrdersTotal ()- 1 ;Loop>= 0 ;Loop--) { if ( OrderSelect (Loop,SELECT_BY_POS,MODE_TRADES)) if (OrderSymbol()== Symbol ()&&OrderMagicNumber()==MagicNumber) { bool
Hi, Doing a backtest my trades bunch-up how ca I correct this
Hi, I am looking for advice, as lot size do not match my expecation. My Provider had 20K account with leverage 1:500. I have 10K account with leverage 1:100. Nevertheless if the provider set a trade in size of 0.38 lot, than the trade is copied as 0.03 lot. I have 95% money in copy deposit. Spread
#property copyright "CVM" #property link "https://www.google.com" #property version "1.00" #property description "Trend Following EA Using EMA and eventually HTF confluence" #include <stdlib.mqh> #include <stderror.mqh> //--- indicator settings #property indicator_chart_window #property
I want to call buffer value from zone indicator , it is multitimeframe indicator. here is its buffer int t1; t1= 0 ; SetIndexBuffer (t1,BufferResistance1); SetIndexEmptyValue(t1, 0.0 ); SetIndexStyle(t1, DRAW_NONE ); t1+= 1 ; SetIndexBuffer (t1,BufferResistance2); SetIndexEmptyValue(t1, 0.0 );
Hi, I want to have iMA 200 period on iATR 14 period in MT4. I have written the following code but it returns 0 and I don't what is the problem. Any help is appreciated. MA200=iMA(_Symbol,PERIOD_CURRENT,200,0,MODE_SMA,iATR(_Symbol,PERIOD_CURRENT,14,0),0); Attached phot shows my request clearly
I have been using the following line: double ThisZigZag = iCustom(NULL,0,"ZigZag",12,5,3,3,0); in order to try to work out whether or not the indicator is going up or down but it just returns 0.0 (zero) all the time. I have spent all day trying to get some help and would welcome any suggestions.
I have the forex.com version of MT4. and when trying to set the Strategy Tester, I find that the Symbol drop-down is "jittery" in that it keeps updating the list and rebuilding it to the bottom of the list. This makes it hard to select a Symbol higher up on the list because the list keeps updating
This is one ive thought about many times, there are loads of EAs available for sale on here, who knows which ones are good, which are scams, which work sometimes etc. Does anyone trust their own EA to let me have a copy for an inflated price on the condition that I only pay for it after it has made
Hi! So I have been trying to implement a simple strategy, which I plan to develop further. The first step should work as follows: - buy at 23:30 and close at 00:05. I used a simple "if" function with "Hour", "minute" and "seconds", however it does not open any positions. Could you please help me
Hi! I try to create a strategy which works as follows: - open a Long position at 0:55 am with a very wide TP and SL - at 1:05 am change TP into the price, at which the current position was initially opened. Is this possible to create such condition? And if so, could anyone please help me with this
Hello,   I would like to print the number of the line in my code. For example if (condition1 && condition2){Print("Error in line ",GetLineNumber());}   where the function GetLineNumber() is a function the gives the number of the line where it is called.   Is there such a function out there?  Any...
[Deleted]
Hi all Error code 149 ("Hedge is prohibited") that is returned to a client at the attempt to open an opposite position to an existing one if hedging is prohibited But you need to try ordersend to know if it's ok or not ! How to know that in tne init() of an EA for example ? thanks
I have an indicator that adds values to the previous value of the buffer. My formula is: buffer[i] = buffer[i+1] + some_values Now the problem is after sometime when attaching the indicator to the chart, all the values indicator repaint. See images below: After attaching to chart: After sometime or
I have this value from a function MAXVALUE(). the value is less then 0.004. i need to show this value as it is; that is 0.004 and not 0 as it is currently shown. i've tried Normalize double and trying to multiple in the function then divide outside the function but the value is still 0. ideas