MQL4 and MetaTrader 4 - page 261

Hi, I am new to learning MQL4 coding and I am trying to limit my program to oly allow one open order at a time however in my backtest I am getting multiple orders opened up. Here is my code. extern int TakeProfit = 40, StopLoss = 40; extern double lots = 0.10; void OnTick() { // create
Greetings, Will someone please help me with this.  When I go to the Market page and look under Free MT4 EA's, none of them will download for me.  It asks "Do you have MT4/Open MT4?" and I do have MT4 installed already, so I click on that and nothing happens.  I've tried reinstalling the program,...
Hello, when I run the following code it works as supposed to with no errors, but when I back test it ,it creates the error (incorrect start position 0 for ArraySort function) void OnInit () { int ct = 50 ; long eaHistoryArr[][ 2 ]; ArrayResize (eaHistoryArr, ct); ArrayInitialize
I have a new desktop with an AMD CPU (not sure if that matters). I have been trying to download and install any brokers MT4 and none of them finish installation. They all say near the end of the installation "something went wrong....try again later". An icon appears on my desktop that will not open
Hey guys, When i customize the timeframes (visualization) on my Pattern Indicator (MT4) and switch between timeframes on my chart the arrows of all timeframes get mixed up and floating all over the screen. Refreshing doesn't work and tried different indicators but same problem. When i check the box
Hello, I'm looking for someone who can help me develop an RSI crossing warning indicator. I tried in vain with freelancers and those 4 times. and i ran into crooks. my project is simple if a charitable soul is willing to help me. Adrien Scenario 1 Higher timeframe (h4) -- RSI 1 greater than RSI 2
MT4 newbie. This is actually my first trade so thanks for the patience. Here's what I'm trying to achieve. Buy EURCHF Entry: 1.0800 Stop Loss: 1.0735 Target 1: 1.0875 Target 2: 1.1010 I've read enough about how to do this such that I tried to do this in two trades, each with the same Entry and Stop
[Deleted]
Can anyone explain to me how I would set a custom indicator into a series array? I need to find the highest/lowest value of an indicator for a certain number of bars. I did read somewhere that explained I would need to place the indicator into a series array then do ArrayMaximum and ArrayMinimum to...
Hi, I am new on MT4. I was looking for an EA which allow me to add multiple TP on single trade. for example:  Add a Stop loss at -20 pips Add Take Profit 1 at +20 pips Add Take Profit 2 at +30 pips SO basically when Take Profit 1 hit +20 pips it start operating as Stop loss. Trade will close once it...
All of a sudden, when I open up MT4, I'm not automatically logged in as I usually am. Instead, I am prompted to log in. But the listed server, FXCM-USDDemo01, is incorrect. If I click on the drop-down menu and select the correct server, FXCM2-USDDemo01 (notice the "2" that appears after "FXCM"), and
hi, i would like to close open orders, what is missing in my code? especially closing orders part? thank you int period1 = 50 ; int ticket; double volume= 0.1 ; input int trailing = 250 ; int OnInit () { return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason) { } void OnTick ()
Hello, I am looking for a Horizontal line which do not display by the normal curved line, but instead, I only need it to show horizontal line level. Is someone already have it or, can lead me to do it myself ? Thanks
Hello, I typed my MetaQuotes ID within the Notifications list under Options on my MT4 desktop platform. I tested the push notifications and the message was sent to MT4 on my phone. I ensured that the indicator I am using has "DoAlert" as an option under Inputs. The notifications are not coming to my
hi Everyone, I have written a code for trying to enter a trade and exit a trade based on an fractal indicator . however, im only able to exit trade with trade profit but unable to exit a trade with the fractal. for example...... : -Enter buy trade with an up arrow , and exit the trade when down
Hi there, Can anyone please tell me which indicator is this one that presents: -current price -spread -current candle high -current candle low -pips to HOD -pips to LOD -candle time Thanks a lot.
Hello, I ran a backtest of my EA I'm building using the backtest optimizer. Started with 1000 USD, ran it over 2020 year data full tick data. Was surprised to find some entries that were producing 300K profit in a year with only starting 1000 USD - Thought I had hit the jackpot there for a second
hi when I open position in the chart shows some line and arrow I don't want it puts this objects in the chart when I open position what should I do? Best Regards Neda
Hello, is it possible to have a certain range of bars already on the chart when the strategy tester starts in MT4? Thanks
This code prints "0" though it should print "1". struct X { int N; X() { static int n = 1 ; Print (n); } }; X x; void OnStart () { } This code prints "1". struct X { int N; X() { static int n = 1
How can I program my EA to do something when a new candle has appeared? What is the command for a new candle appearing? Anything like: OnNewBar() I need to do something when a new candle arrives, e.g. to reinitialize the content of a variable. E.g.: if (A New Bar Arrives) {MyVariable = '' '';}
Hi folks, I am trying to retrieve history data from MT4 to build a model with. The problem I have is that I need to load the values of a custom indicator into a 3 dimensional array and when i try to run the Expert is history, it does not work, and gives the alert: "not eough memory for EX4 file" and
  iCustom problem  (1)
Hello, I have a strange problem. When I load my written indicator based on another iCustom indicator on the chart, two lines appear, although it should be only one. #property strict #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 clrYellow #property
// Pivot Plus Add-On (Personal) #property copyright "Copyright @ Malcolm" #property link "www.mql4.com" #property version "1.0" #property description "Additional Pivot Points for more market opportunities" #include <stdlib.mqh> #include <stderror.mqh> //--- indicator settings #property
Hello I'm new to mql4 coding so please assist me in understanding why the results from the iMA() are correct yet the iMAOnArray() is giving me wrong results compared to the ones i have on the charts. Please review my code and assist me in getting the results as expected. Code attached. extern int
Would anyone have a .mq4 indicator similar to these to match indicator buffers? <ex4 file removed>
just downloaded mt4, trying to set up trades for monday, when new order is selected it will not let me place entries. Please advise Ron
Hello, I have an indicator that I'm trying to use with the MT2 trading connector. However MT2 is not recognizing the signal even though I select the correct buffers. can someone please check it and let me know if something should be changed on the code? The way that indicator works is that if the
I want to know the concept for create same TP for 5 open orders. Example 5 buy orders and all have same TP. First open one order with TP and next orders will open by some distance with same tp. This TP will trail according to market move. Plz suggest
Hello, I am trying to HIDE OBJECT according STRING character in the DESCRIPTION (and not in the name). Can you help me please. I have done so much trials with no success. thank you again. //|--- for the string character in the name for ( int i_obj= ObjectsTotal ()- 1 ;i_obj>= 0 ;i_obj--) {
Hi I can't contact my broker and can't withdraw my money. What should I do