MQL4 and MetaTrader 4 - page 909

[Deleted]
Hello there, I created a code to lock in profit after a XX number of positive pips has been reached. The problem is that i created this code to use on EA in my live account, where i could only afford 2x the minimum lot and the code only runs if the order's lot is 2x the min_lot. When i used this EA...
[Deleted]
We have WindowExpertName() to get the name of the file in which the function called. I wonder if there is a function or a possible way to get the time (created/last modified) of the file Thank for any help
[Deleted]
When I copy & paste an indicator into the broker's program I make sure the platform is closed.  Yet when I open the platform the indicator is missing.  Some say each Custom Indicator section will only accommodate so many indicators, so I deleted a few indicators in that section before adding new...
hello guys, can sameone teach me how to use alert of custom indicator as reference in opening trade?  example i want to set alert on custom indicator for opening trade, but i dont know how to use this alert on ea.
Hi :   I want to apply the rule that if an order is opened, then in the following, say 30 bars, no same direction order can be opened.   I tried to implement this using the Time difference between the two orders, but obviously when it comes to weekend, this will fail.   Anyone get any idea how to...
Hi:   I have the following code which is not working:   file = FileOpen("Result.csv", FILE_CSV|FILE_WRITE, ";");         if ( file > 0){            FileSeek(file, 0, SEEK_END);             FileWrite(file, TimeToStr(Time[g_Shift], TIME_DATE|TIME_MINUTES), "TREND=", g_Trend, "Open Short",...
need to convert a wonderfull Indicator to Expert advisor ...... Any Help And promise it will be penifit.
Hi. I'de control numbers of order to 4 trades for each pair symbol using an EA. Can you help me ?
I am new to MetaTrader and I am having troubles with my EA. I activated an EA in my demo account and start() is not getting called. I was developing the EA a couple weeks ago and it was working well both on the demo and strategy tester. I have been away for a couple weeks, and upon my return; after...
So I am testing my EA with the EXACT same parameters on the d1 timeframe and comparing 90% modelling quality using data from metquotes (history center) with 99% modelling quality using tick data from Dukascopy. I would have thought that the tick difference (not accurate < 1min on 90%) would not make...
Hi all. I need some help in writing the code for an EA I am testing to be able to determine lot size based on account balance an the number of pairs being traded. Thanks 
[Deleted]
On the eve of the weekend.... The topic is inspired by the reasoning in neighbouring threads about the value of TC optimisation, statistical performance of TC, etc. I'm not trying to address any practical aspects, I'm more interested in the conceptual approach. So, thesis #1: There is a TC: TP - X
I have some few custom indicators that are not activated when you start MT4 but they need me to change the time frame to see them turn. it is possible to correct?
[Deleted]
Hi, I know ZEROOOOOOOOOOO about coding. Im switching from my old platform to metatrader, and I wanted to use my old volume indicator (dpr file) in metatrader (mq4 file?) When I open the DPR file with meta-trader, this is the code I get; Can someone please convert it for me into a mq4 version?...
Hi, i have completed the EA as per customer requirement.but he need s/l & t/p should have following conditions. can anyone help on this. EA placing orders based on 5min chart Stop Loss & Take profit 30% of Daily ATR with 1:1 Risk Reward Ratio. attached image will breify more..
[Deleted]
Anyone has experience please share to me. I test my EA with 99.9% model quality and i want to know : Is the real account will get a result same or nearly the same as 99.9% model quality result?
I have read through the threads in the forum which seem to be outdated and not have an ideal solution. Is there a way to auto detect the difference between broker time and GMT without the user needing to input a GMT offset? Currently I use code that will add or subtract the GMT offset from the...
Wecan look for a specific magic number by looping through MOD_TRADES. for( int Loop = 0; Loop <= OrdersTotal() - 1 ; Loop ++ ){  OrderSelect( Loop , SELECT_BY_POS , MODE_TRADES );  if( OrderMagicNumber() == Magic_Number )   {    // some interesting code  }}  Butwhat happens to that loop when you...
Hello everyone, I was looking for advice on orders accounting coding. I have coded 3 EA's that I am using, and have not tried to run them at the same time, but on separate MT4 terminals. I want to run them on the same terminal but am fearful my O.A. code is outdated. Any code anyone use to run...
[Deleted]
Hi all, I need to repaint the bars on my charts and I came up with the following half solution: //+------------------------------------------------------------------+//| Custom indicator iteration...
[Deleted]
Hi Guys, I need to shift the bars generated by the code below: int i;for(i=0; i<500; i++){   string name1 = "barBody" + i;   string name2 = "barClose" + i;   int type = OBJ_TREND;   int window = 0;   datetime time1 = Time[i];   double price1 = High[i];   datetime time2 = Time[i];   double price2=...
Dear All,    I am a newbie in using the strategy tester. When I started to use it, I dont know how to make the setting correctly. My questions are: 1. how to ascertain that the data over the specified period is reliable? 2. Is there any relationship between the From date, to date and the Max bars in...
[Deleted]
  Link Graphic  (3)
First of all, sorry fior my english, I'm french... 1/I'd like to know how can I link charts. For example, I'd like to draw a line in the 4h00, and I'd like to see (to be report) on the 30 minutes. Is it possible ? Thanks
//+------------------------------------------------------------------+//|                                              Buy  with SL and TP |//|                               Copyright © 2008, smjones          |//|...
Hallo please help me...   I have a problem with SendOrder on OIL. How do I defined SL and TP ? For the definition price I use NormalizeDouble. My EA work in backtest O.K., but on real trade type error price SL a TP.    For example: double slb=NormalizeDouble(Ask-SL*Point,Digits); double...
Hi All Ignore whether this check is actually a valid way to go short :-) Can any one spot what's up with this code, I cant figure it out: if(dbMACDDivergence_Bar1 <= dbDivergenceShortSetting) { //short conditions met } Where dbDivergenceShortSetting is set to -0.3 the aim of the check is to
Hi there When one uses the ordersend/orderclose command, I know that ordersend returns -1 if it fails, and some positive integer if it succeeds, we can store this in a variable called ticket. when you use orderclose, that can return true or false to indicate whether the close command succeeded, but
Preliminary Announcement of the New MetaTrader 4 Build 491 New MetaTrader 4 client terminal is being prepared for release. Terminal: Revised one click trading system: When One Click Trading mode is enabled, the trading dialog is closed right after a successful operation. In case of an error, the...
Hi: Can anyone explain what's the meaning of an OrderSwap in a forex market please? Also, in the mt4, how can I get the pipcost for a single pip please?   Thanks  
when i load mt4 platform i have to recompile ea's to work..otherwise the ea's placed on charts won't work...