MQL4 and MetaTrader 4 - page 84

Dear friends, need your help. If EA already run in one pair, then how to avoid EA run in the other pair? So EA only run in one pair. Thank you.
Hi, i need to extract draw down per trade from an EA. I've had a go at the program (below), but i am not sure how to extract the high and low values between each trade execution. also how would i extract this directly to csv? void OnTick () { int HighestCandle= iHighest ( _Symbol , _Period
Is there a possibility to start a backtest from the command line? Something like "terminal.exe -tester EAxyz EURUSD 5min 2000.01.01 2010.01.01" ? Any other idea, how I could start a backtest from outside? I want to use external programs that start different backtests automaticaly. But I have not...
I tried demo on mt4 and see that on metaquotes-demo, for EUR/USD, there is no commission nor any spread except for roll over hours. Last year on metaquotes-demo, the simple EA I used scored very well
//+------------------------------------------------------------------+ //| testma1250.mq4 | //| Copyright 2021, MetaQuotes Software Corp. | //| https://www.mql5.com |
How can i make the trade utility size bigger on my screen, it is literally 1" x 1.5" and cant see any of the boxes or options
Hello everyone I am need of switching indicators onto the top of the main chart and could not do it. I did over 4 hours of trying to figure how to but was not able to. if anyone can help guide me on how to setup 1 indicator chart on top of the main currency exchange chart, it will help east alot for
Hi   I am getting an error message - IgnoreArray - invalid array access - on this .mqh file, when trying to compile it. Is it possibly related to the changes that came with v600?I can't seem to find enough info on the eror message to help me work out what the problem is. I am hoping to use this code...
I have a script which create hst files, i want to use this chart data from the hst files for some indicators but i see when i use iClose() function that the latest close price is only giving back correctly when i open a offline chart from the hst file and when i update this offline chart, then i see
Hi, I have an expert attach to a chart. It need to iterate through all other opened charts, and iterate through objects in all of this charts. I iterate through charts without problems, but I don't know how to iterate through objects in another chart than the one where the expert is attached
Hi, thank you for taking the time to read this thread. I added a new function to this program so that it only closes its own orders when trading and does not close other orders that were opened manually or opened by other expert advisors. By adding this function, the program makes only one order
hello guys , hope you are doing well. i wrote a code that i'm currently using to calculate profit factor for a specific magic number : double Grosswin(){ int win=OrderProfit(); double grosswin= 0 ; int i= 0 ; if (cnt> 0 ) for ( i ;i<cnt ; i++) if ( OrderSelect (i, SELECT_BY_POS, MODE_HISTORY)) if
  Using spline(s)  (23   1 2 3)
This thread will be dedicated to spline(s) usage in technical analysis ________________________ Direct cause for considering splines is the request by simba to create a manual nonlinear trend line, and how ever I thought of it, it seemed that the most logical way of doing it was to use some of the...
The problem is from the Mechmatov forum, here . Петя заметил, что у всех его 25 одноклассников различное число друзей в этом классе. Сколько друзей может быть у Пети? Comment: 1. Petya is also in this class, i.e. there are 26 people in total in the class. 2. If A is friends with B, then B is friends
Hi , i have this code i want to test a brokers stop levels . When i comment out the sections defined on the timer function the timer can be set . When i leave it as is i get an error "Cannot set millisecond timer (100)" It's probably something i missed , but i can't find it. Also , an mt5 is running
A custom indicator included as a resource slow down 60 times tester against using the same indicator with the same inputs (not as a resource). Is it a bug? Or am I doing something wrong? Here is a simple EA so you can try it: #define INDI_AS_RESOURCE // If you want to run the EA without a resource
[Deleted]
Hi all, I'm trying to learn more about appdialog boxes. The final thing I wanted to learn was how to remove the MinMax and Close buttons from the top right hand corner. Shown in the image: So far I'm struggling big time with how to exactly remove them. I would input some code, but I don't really
Hi champs, This is probably a newbies question and please accept my appologies if it is, but I've been searching for a couple of days now and couldn't find any working code to close all my open orders at a certain time of the day. Below is an extract of my EA in MT4 and I've tried several pieces of
Hi there:-) I'm new to coding in MT4 and would love if someone would be so kind to guide me in the right direction:-) I have attached an indicator that works brilliant... It automatically saves a screenshot when you open and close a trade... My problem is that i would like to set a custom folder
In MQL4, the following trailing stop loss function, why the order will be continuously modified within the same 1 second? The effect I want is to adjust the SL position by 100 points every time the profit increases by 100 points. Is there anyone who can modify it for me? Thanks! datetime
//+------------------------------------------------------------------+ //| test1.mq4 | //| Copyright 2023, Frank Harey | //| https://www.mql5.com |
  Custom Indicator  (2)
Hello! I have a problem with getting the values for an indicator into a script. It is about ZigZag indicator , I am only getting the values for the default inputs as setted in the indicator. If I change the input in my iCustom function it will not have any efect. This is how I get the indicator
I have an EA that only works on H1 timeframe, is there a way to: - Automatically change timeframe to H1 when EA is attached succesfully to a chart? - Disable the abiility to change timeframe while the EA is attached to a chart. Thank you very much!
  Trades open once  (1)
I want to hedge my trades multiple times instead of once. For example If price opens at buy 1.12345 & sell at 1.12295, how do I hedge my trades at that price multiple times? int MagicNumber=87897; int BuyTrade= 0 ; int SellTrade= 0 ; int Direction= 2 ; int Hedge= 0 ; double Filter= 0 ;
//+------------------------------------------------------------------+ //| RSI_MACD_Stochastic.mq4 | //| Copyright 2023, MetaQuotes Software Corp. | //| https://www.mql5.com |
I'm just messing around with this custom indicator where I am trying to inherit CChartObjectRectangle and add some methods to it. I am not sure how I can create the custom object and keep calling the methods associated with the object in the different e vent handling functions. If I store pointers
-
may i request a page or any type of list that contain all MT4 Brokers link in onepage? maybe in a sticky topic or a new MT4 brokers page thnx
[Deleted]
Hello everyone, as you know by default charts on mt4 load x amount of history on chart based on settings/broker availability. My question is, let's say I'm on 1m chart and on platform settings I set "maximum bars on charts" to 100k. Then my charts will contain likely 20k bars because of most broker
Dear Friends; I want my Expert Advisor to make trades based on the RSI value in one direction only (up or down trend). How can I add the following logic to the EA code in MetaTrader 4? If RSI > 50 in Timeframe D1 ------> only long positions allowed If RSI < 50 in Timeframe D1 ------> only short
Hi All I am trying to get the consecutive number of losses from within my EA. The number does count up but when i get a win ,either on buy or sell the counter does not reset. Is there something wrong with my code? void BuyCountLosses(){   int LossBuy =0;       for( cnt = OrdersHistoryTotal() - 1;...