Download MetaTrader 5

MQL4 and MetaTrader 4 - page 1027

To post a new topic, please log in or register
As a safetymeasure I call this early in the Start function: //---------------- SaveAccount ------------------------bool  SaveAccount() {   if( AccountBalance() < BalanceCutOff ) {   Alert("In order to protect the account ", WindowExpertName()," has stopped trading.", " Balance: ",AccountBalance(),...
Hello guys! I have a problem trying to use this library. I put them in metatrader\experts\library I correctly define the path for the .def file ... but my EA print on the register this error: -65495 What can be the problem? And, most, how to solve it? Is it possible that the .def file can be...
This code will place an arrow on a chart with a unique name every second. Have tried everything to change arrow from up to down and change color from red to lime. Have had no luck. Is there some thing that I'm missing or not doing write? ObjectCreate(StringConcatenate("ArrowUpA",TimeCurrent())...
I'm currently using the below function to determine lot sizes. I'd like to make it so that users can use a risk %. How can this be done? double CalculateLots(double Lots) { double Margin; Margin = AccountFreeMargin( ) ; double Hasil; double MLots ; Hasil = Margin/1000; MLots = MathFloor(Hasil);...
  Vesion 5 (1)
I would like to see what you are adding to version 5 of MetaTrader. Is there any documentation that does this? Bill
Hello coders, I have tried to add a signal line to the Osma indicator. It does not work. Please correct the code. Thank you for your help!
Is it possible to create an HTML table in the MessageBox or some other way? I want to have a shortcut where I can add a table with specific stuff I use to look at every now and then.
Hello, I need help regarding esting EA in MT4. I have several EA that I would like to test with different parameters at the same time. But the problem is, that I get all the trades in same trade terminal from all EA, so I can not evaluate results of each EA setup seperately. Is there any way to...
Hello, i am searching for a good MT4-Coder. It's for some changes in aExpert Advisor. Please PM to me. Best regards, halobungie
I'd like to write an EA that tracks an indicators values over all timeframes but I need to get the current values that are set on this indicator. For instance: double l_icustom_84 = iCustom(NULL, TIMEFRAME, "SMAAngle", SMAMODE, ANGLET, PREVSHIFT, 0, 0, 0). I need to get the values on SMAMODE,...
Hello guys, When I test an expert advisor with strategy tester, I see the metatrader run but when it is finish it doesn't show me the results....why?? Thank you. Alessandro
Is there any reason why a loop (like the one below) wouldn't be an effective method? My EA actively monitors a couple of indicators and then monitors active orders for trailing stop's and take profit's as well as reads/writes to multiple files. start() // Special function start()...
When using OrderModify, should you check if the value has changed before sending the stop loss adjustment? Otherwise, won't you get a lot of server traffic being sent every single tick? Is there a way to check it on pip changes instead? I have 5 decimals on my system so would rather a change every 4...
The following code does not work. What is wrong? void DrawBox(datetime time1, double price1, datetime time2, double price2) { string name = "Rectangle"; ObjectCreate(name, OBJ_RECTANGLE, 0, 0, 0, 0, 0); ObjectSet(name, OBJPROP_TIME1, time1); ObjectSet(name, OBJPROP_TIME2, time2);...
since IBFX is now with 5 decimal places, for some reason when i declare double, the values have 4 decimal places. example Ask price: 1.31475 double askk=Ask; Comment(askk); //the comment only contains 4 decimal places, 1.3147 Is there a way to add more decimal places to a double datatype?
AccountProfit() returns total profit value of the current account. Is there a way to get profit value for only those orders created with a specific magic number ?? Thank you.
  indicator to EA (11   1 2)
i have this indicator, and i want to add it as a function to the EA. With the EA, my CPU is always at 100%, accessing this indicator from multi time frames, and multi pairs. I was thinking of including the indicator into the EA, so that the CPU usage is lower. Below is the function i have written in...
i want this this turned in to an EA thanks i want it to open buy orders when the averages cross to go up and close buys when they cross to go down i want it to open sale orders when the averages cross to go down and close sales when they cross to go up also to do both these at the same time i also...
I'm trying to run a script on my demo account to open an order. The script runs but on sending the order the Journal just says script unloaded. None of my error logging prints out and the order doesn't appear. ANy ideas?
I'll break down my system to make sure we are both thinking in the same way. Here it is when I do it manually: 1. At X TIME when the market starts a new trading day. I look at thePREVIOUS days HIGH and LOW. (from now at 10pm to 10pm GMT the day before) 2. I place a Buy Stop at the High about 5-10...
It seems live update has a problem with Vista. Vista asked me for administrative permission when live update started. I allowed. But the download never started. It seems it's Vista only and XP is OK. Does anyone have solution? I'm now stuck with build 220. Please help. Thanks.
  free vps (1)
Hello everyone, does anyone know where i can get a free virtual server to run my ea? someone told me it's available, but does not know where. if you know where i can get one,kindly reply. Thanks.
I've run into a problem trying to change the name of function Criterion in my EA which is patterned from the usualexpert.mq4. I wanted a unique trading criteria/strategy name to differentiate it from others in the metatrader include folder. The function has been renamed in the list of include files,...
Can somebody please tell me how to back test with the Strategy tester correctly? Every time it runs the test, it has zero results, zero trades. I downloaded the history files and set the expert key correctly (I believe). It doesn't give any recognizable errors in the journal. It runs the test, or so...
Is there a way to keep drawing an object on a chart, with the same name, continuously? Is there a way to make the name a variable?
I'd like to check the value of an indicator on a different timeframe to verify a trade. Let's just assume that it's ANY indicator, custom or not. How can this be done?
hi, i started to do my first expert advisor, but first i had to do the indicator.... somebody can say to me whats the diffence between the indicator and the expert advisor? why i have to do the indicator first? i'm trying to do with just parabolic sar, someboby have some advice to me with that...
I want to modify existing orders when the price action has moved beyond 50 pips from the order open price. I have the following using the ticket variable of the last opened order but the strategy tester does not have any modified orders only buy and sell. ANy ideas? Would it be better to find the...
1...102010211022102310241025102610271028102910301031103210331034...1245