Download MetaTrader 5

MQL4 and MetaTrader 4 - page 924

To post a new topic, please log in or register
I have seen other entries about this, but none seemed to address a solution to what I am seeing. I want to stop opening new trades on Thursday night at 2300 hours. Then on Friday prior to market close, say by an hour, I want to close all open trades. Here is my code snippet:    if ()   {      Print...
I'm making an EA that makes pending orders for breakout strategies. However during backtesting orders couldn't be sent. It kept displaying the following 3 errors: "OrderSend error 130" "OrderSend error 4107" but I'd already allowed dll imports and "invalid takeprofit for OrderSend Function" I've...
I find myself in the need of understanding PSARs better. In a particular strategy I am using I have tried to code opening of trades based on use of PSARs. In one version, if I want to place a buy, I check the PSAR to see if it is above or below the current price. based on anothers suggestion, I...
Hello everybody, I have a very important question to ask, I have searched throughout the forum for my answer but did not come accross the answer, if I missed it I am sorry to ask a question twice but I reallly need help. The strategy I use is to go long when the MACD crosses below 0 and points up...
hello there i cant get my EA to email (alert) me the profit / loss amount for when a deal has closed. the following is happening: i get 100s of mail alerts (every tick after the deal has closed). what is the logic to check (only once) the profit / loss amount? thanks in advance. jm78
Could anyone give me a hint? I'm trying to code a horizontal line which is intended to start at the last high/low. If there's a new high/low the line should be deleted and be drawn right from the new high/low. Sadly, it doesn't work. I don't understand why it always refers to the first high/low...
I have written a simple DLL that processes an array and returned it to MT4 float* getArray(float* input) { // // // // Process // // return value; } How do I import the DLL and make use of it? Am I allowed to use pointers in MQL4? #import "test.dll" float*...
  Order Modify (1)
Hi... Can anybody help me how to use "OrderModify" Function ? I need to change my stop loss everytime I hit certain value (trailing stop loss) Thanks
Installed MT4 on Windows 7 and found that logs are not created in /experts/logs. Either they are not being created or Windows 7 is not allowing me to see them. Has anyone experienced this or know of a fix?
Hi! I would like to know if it is possible to open more than 1 MT4 application in the same Windows session. It would be useful to work in more than an account simultaneously but I didn't find any way to do it. Thanks, Gustavo
I am using a charting software similar to MetaStocks for creating buy and sell signals. The software can exchange Date via DDE. So I am searching a way to translate the signal of the software, which would be for example "EURUSD:Enter LONG", into an order for MT4. Maybe through DDE or a DLL. In the...
Hi, I am new to trading and would appreciate some help, is it possible to have somekind of indicator in the form of an arrow on the screen, to show if the close of the day is smaller or bigger then the opening, and that for the last five days? I know it migth be easy but for me impossible to...
I am trying to develop the Chande Momentum Indicator but something mysterious is happening. If you can take a look in my code you will find at the last step of the calculation the following code: cmo4 = scmo1[i]+cmo3; If you comment this line you can see in the log file, in CSV format, that the...
Hello fellow traders, I have some problems using the metaquotes history for 90% modelling quality. I have downloaded the Eur/usd data from the history center so I now have the files in the downloads folder in metatrader, it looks like this http://screencast.com/t/NGZkYzRl but when I do the backtest...
Hi there i looking for EA that can manage manual entry to set automatically20pip.Just for Take Profit,no need stoploss and trailling..do anyonehave one that really work very well?
I have been looking for the following three indicators for almost a week now with no luck. They come with FX Accucharts but were no where to be found for MetaTrader. Few people have suggested indicators which were similar in name, but not in the shape they provided when compared with Accucharts !...
Have written first EA using iStocastic( etc, ect,andsoon). Get a value on one platform and not on another. Is there a function call not mentioned in the MACD sample, that initialises bar values for these indicators?
hi guys.......i have a problem. i need to avoid to open an order after i have closed another order in the same bar so...i have thought to introduce a delay. i have tried with " sleep " but it doesn t go. i tried with " timecurrent()-orderopentime()> x "............but nothing....
I am trying to divide number of seconds by a constant integer and the division always results in zero. What am I doing wrong? Here is the code. string str1 = "2010.3.15 16:00"; string str2 = "2010.3.17 07:00"; int specifiedPeriod = 5; datetime TN = TimeCurrent(); datetime dt1 = StrToTime(str1);...
Hi, I need help in avoiding orderSend error 131 and orderClose error 131. Here is the value I assign to lot size: Double lots=NormalizeDouble(MathAbs((AccountEquity()/10000)),2); and Here is How I send an order: OrderSend(Symb,OP_SELL,lots,Bid,2,Ask+600*Point,Ask-2000*Point); I need to program my...
Greetings Traders, This is a manual trading expert that allows you to place a buy or sell order at a specific price on a pair. The wonderful thing about this is not only does it allow you to have a typical trailing stop on your orders but a trailing profit also. Makes a great system to trade news...
Hi guys... If I used "Print" command, where could I find it when I execute the program ? For example... Print (Ask); Where can I find the result ?
Hello Guy's, can somebody help me witch programming this Strategie? I would trade an imaginate Gap between 22.00 and 08.00 o'clock (NewYork Close -> NY Open). If 22.00 Close Price is under 08.00 Open Price the EA should go short till Gap Close (22.00 Close). If 22.00 Close Price is over 08.00 Open...
Francois Tremblay
Hi, I have the following problem and seems I'm not able to find the solution. The code for my trailing stop is the following : for (iCnt = OrdersTotal()-1; iCnt >= 0; iCnt --) { if(OrderSelect(iCnt, SELECT_BY_POS, MODE_TRADES)) if(OrderSymbol() == Symbol()) {...
I need some help programming a simple indicator. Hope someone can help me with this. The indicator must be in a separate window. SRSI=Ema2 Of Rsi14 SMA=Ema3 Of Ema3 Of Ema3 Of Rsi14 DMA=SMA5 of Ema3 Of Ema3 Of Rsi14 I also need levels 60 and 40 plotted with grey dashed lines. This is the original...
I have 2 deals that look like are made by my EA, but there is something really strange about them, bought are in a no trading condition. I mean the EA w8s for a set of indicators and the 2 deals are executed when one of the indicator is nowhere near the required levels for a deal to be made. The...
I have attached an EA and two indicaters. Note the comment when running the EA in tester. The value from HPthreePM (which I don't really care about, just testing) shows up but the value from AR3EURUSDH1a does not. I do want AR3EURUSDH1a though. The values are brought in lines 4 and 5 in start. The...
I would like to analyze last profit trades in my EA before open a new trade. How can I do that? Using: OrderSelect(0, SELECT_BY_POS, MODE_HISTORY) doesn't seems to bring last close trade... Thanks
Hi everyone, My problem is that I need to close/delete orders if the price reaches the MA i.e. Condition #1 ..... TRUE OrderSend (.................) Condition #2 ....... TRUE OrderDelete () / OrderClose No new order can be excuted if the first one is not closed/deleted Hope it's clear ...
Hello,is there an MTF Double Smoothed Bressert indicator on this site (or anywhere online),please ? Is there an orderly way of searching for indicators here? They don't seem to be in alphabetical order-perhaps I've missed something. Thanks Mike