Download MetaTrader 5

MQL4 and MetaTrader 4 - page 653

To post a new topic, please log in or register
New article Dr. Tradelove or How I Stopped Worrying and Created a Self-Training Expert Advisor is published at mql5.com: Just over a year ago joo, in his article "Genetic Algorithms - It's Easy!", gave us a tool for implementation of the genetic algorithm in MQL5. Now utilizing the tool we will...
I am a new user of MT4 and don't know MT4 coding language. Please change the following into MT4 indicator: 1. Price channel formed by highest high of 20 days and lowest low of 20 days; 2. Price channel formed by simple average of high and low prices of 20 days; Thanks a lot!
Ok well since Im new to this forum I would like to ask this I have been testing settings of ema 1 and ema 5 crossover for entry and use a stop loss to get out of whipsaws. Meaning getting out with profit on paper trades/ It works with stocks, stock options, penny stocks( yuck). But with the forex...
Is if possible to write an EA that trades using control points instead of every tick? If not, what possible good is that option?
How to draw rectangle from 8am to 9am where the height of rectangle is from daily low price to daily high price?
I need to make this order function use a % of the AccountEquity rather than a % of the AccountFreeMargin. This code allows the risk to be adjusted depending on a win/loss, but calculates risk depending on free margin when I need it to calculate based on equity. In the 2nd post of this thread I have...
Can someone answer this? In the realms of MT4 client terminal and broker server, where does the data feed for the MT4 charts come from? Is this from the MT4 broker server too, or is that only responsible for trade execution and modification, with the data feed coming from metaquotes directly? Or is...
hey guys, I need to know how to add the Positive Volume Index (PVI) indicator to my charts. I will appreciate any assistance. cheers.
Hallo everyone I code EA wicth work on 6 pair with low spread. Problem occour when two or more pair try to open order on same time. I get error " trader context is busy" and EA open only one pair rest pairs are not opend. Can someone please tell me how to solve the problem. I have different magic...
Hello, I am newbie with MQL4. I'm sorry for my bad english. I made an EA with two strategies. But I don't know what is wrong. When I compile this EA, the metaeditor doesn't tell me any message. But when I test the EA in MT4 with demo account, it doesn't print buy and sell signs. I put only buy...
DEAR FREINDS HERE ANYONE KNOW HOW TO MAKE INDICATOR I AM MENTIONING SOME CONDITION PLS MAKE THIS FOR METATRADER 4 MY MAIL ID IS rajaswamym@yah00,com IF POSSIBLE PLS REVERT ME BACK Day Trading Technique using Bollinger Bands Procedure for buy/long trade: In this strategy we...
Hi all, New here and I am currently using a demo account. Been backtesting my EA and it only has 1 month of data only. Is there any place that I can download the M15 AUD/USD ? Any help or any CSV file would be much appreciated. Thanks Hilary
void start()  {    string sym="EURUSD";   OrderSend(sym,OP_BUY,1,Ask,3,0,0,"");  }         when I attach this code to "GBPUSD" chart, it said Ordersend error 4016, Unknown symbol name EURUSD for Ordersend function. But when I run this code on "EURUSD" Chart, it is fine. WHY? How can I use a...
I am somewhat new to MQL4. I worte an EA and tried using the MT4 strategy tester to test it out. My frustration is that every time I run the strategy tester to check out every small change to my code, it appears to download the same historical data over and over again. With this inefficient...
Patrik Polak
Hi, this is manual for trade (buy or sell) only once per 1 bar. Up at the top where you declare yourveriables put static bool ITradedOnThisBar; thenwhere you send your order put if(your critera &&ITradedOnThisBar!=Bars) { ticket=OrderSend(Symbol(),OP_BUY,...); ITradedOnThisBar = Bars; } But what i...
It is well known that after closing MT4 terminal the last data (OHLC) are stored in corresponded HCT-file (history file). Do somebody knows way how to make the terminal to update HCT file without closing it? I suppose that it may be function which save data do HCT-file.
hi i have a problem i open pending orders and i write comment field anything (exmaple CODE-01) but sometimes program changing my comment and self write rIDxxxxxxxxx ( many digits ) for what ??? thx
Hi all, I have an array of ticket numbers saved in a file (10 ticket numbers), What i am trying to do is; I want to search the array and read the 10 nunbers, then if my current ticket number does NOT match ANY of the 10 ticket mumbers i will then have a "bool xyz == false;" Is this possible to...
Hey there guys, I'm getting this problem and dunno what is the reason. Following is an excerpt from my log; 2011.11.15 18:41:27 Alpha1_20111114 EURUSD,M1: ==-----ORDER SENDING PERIMETERS-----==2011.11.15 18:41:27 Alpha1_20111114 EURUSD,M1: SYMBOL IS = EURUSD2011.11.15 18:41:27 Alpha1_20111114 EURUSD...
Hi Ii would like to know if anyone can give me a hand with some code. Still newat coding but can get around most things just having trouble with historylookup. I have looked around and found some code that works but not in the way Iwant. All I want to do is to look up in order history the last open...
i'm trying to build an EA, but i still can't get the logic how to implement it.. the condition is like this. if MA line 1 and MA line 2 cross, it would open a position -> this one i guess i can. when it reach the specific price i've decided, it will close all opened position -> this one i guess also...
Can somebody write me an example of simple indicator that will print text on chart from a comment entered in code but with possibility to choose in what corner the text will be printed.
Hi, when I active an ea on my chart, I can't see the indicator which the ea is using. Why and how can I change this?? Thank you!
Could someone help me to see if system yours and also back test it. I wrote this and not sure it works need some help. #property copyright "" #property link "" //#include <orderfunctions.mqh> #include <eafunctions.mqh> //#include <expiration.mqh> //#include <moneymanagement.mqh> //#include...
Hi all, Firstly apologies as this topic has been covered no end of times as I found when trying to locate a solution to my problem. Iv downloaded tz-pivot.mq4 which can be found in my folder icon in metaeditor. However i cannot get the programme to run. Help !! Kev
//MACD Filter double macd_main = iMACD(a_symbol_0,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1); double macd_sig = iMACD(a_symbol_0,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,1); if ((a_cmd_8==OP_BUY)&&(macd_main<0)) { return(0); } if ((a_cmd_8==OP_SELL)&&(macd_main>0)) { return(0); }...
How do I program my EA to ONLY enter a trade at the bar open... with in a few ticks ? I don't want it to open after it has moved a number of pips. That number can be a variable. Novice programmer... loving this forum... but couldn't find anything by searching... maybe I don't know what to search...
Hello, we have AccountFreeMarginCheck() that will calculate the free margin that remains after the specified position has been opened. But how to calculate what will be the free margin if we close a certain position (not all of them)? Thank you
I need help counting consecutive profit orders and then resetting count after (x) amount of trades.. So far I have: int ProfitHistoryOrdersCount(){    int PosCnt = 0;    int cnt = HistoryTotal();    for (int i = cnt-1; i >=0; i--) {                       if (!OrderSelect(i, SELECT_BY_POS,...
Hey, Is it possible to access tester statistics when the deint() function is called? I tried to calculate the statistics myself by accessing the historical orders, but my values differ from that of the strategy tester. If not possible is there code available that shows exactly how the tester...
1...646647648649650651652653654655656657658659660...1244