MQL4 and MetaTrader 4 - page 172

Hi guys , I want pick up two candles high and low by clicking on them, is it possible and how
My EA ran without any problem all day, opened and closed the trades as it should. But, after some time it gave the "Not enough rights" error and did not open the trades. See picture of the Journal tab. What is it and why did happen
Hello, i have that code. It split CCI value by RSI value. Question is someone know how to change it to split Volume/ATR value? input int Period1 = 14 ; // CCI Period input int Period2 = 14 ; // RSI Period input bool Reverse = false ; // Reverse #property indicator_separate_window #property
My earlier similar titled post refers. I've distilled the issue down to the following:- bool CPivotManager::_getPendingHighBefore(datetime priorToTime,datetime &timeFound)  {   int total=_highPivots.Total();   bool result=false;   CObjVector<CPivotCandidate>*sortPivotCandidates=new...
Hi there, I'm new to coding/EA on Metatrader 4 I have a simple Bollinger Band /RSI EA - its generating small profits BUT the profits can go much higher if i don't have a FIXED take profit price i need the Take profit price to adjust to maximize the run QUESTIONS is there a sample code for TRAILING
Can anyone help me ? when I compile in mt4 strategy tester it says expression not boolean ? it used to say something like 0 errors 0 faults etc ? It's got me, it still compiles the expert advisor ok but Its not confirming that there is no errors in the programme. Geoff
In MQL4, we're taught (for example) to use Time to access the array of datetimes for bars in the current period, and iTime to access the time of a bar for periods other than the one the user is currently looking at. However, in MQL5, there is no Time array, so we're forced to use iTime. This creates
Options > Charts setting are not applied, and neither is the default template
I found that MT4 can read files with FileOpen only in Files folder in MT4 terminal. Is that true? Is there any way to read files in another folder ? int FileOpen ( string filename, int mode, int delimiter=’;’)
I have no idea what i should do to fix this can someone help me out a little with my code and explain where and how i messed up it kind of work when i'm testing it but it's not working on every trade this is the code PLEASE HELP going on 2 days i've been looking into this issue int TrailingStop=
What I want to do is to create a trendline with angle based on 2 anchor points and then find the angle using ObjectGetDouble() so it can help me do various trading tasks such as finding chart patterns. See the code below : // OnTick() event handler                void OnInit() {     // Finding 1st...
Hi, when im using the code below to return the Print, it doesnt work. when i change the code from "<" to ">" it seems to work however. Not sure why "<" doesnt work though. Any advice would be appreciated. #property copyright "Copyright 2021, MetaQuotes Software Corp." #property link
Hello, i'm new to Mql4 and although i have managed to create some basic algorithms for EAs, i am struggling with creating a particular EA for one of the strategies that i have been using for a couple months. You can find the basis of the strategy in this video: 86% Win Rate Highly Profitable Secret
  XOR in mql4  (13   1 2)
I really cant find it in reference... Is there XOR?
Hello, I'm having a problem with the shift parameter for the iMACD and iStochastic functions. I wrote a piece of code that is run at the first tick of every hour: this condition is verified by reading the current Hour() and checking if it's > than the Hour() value saved in a static variable during
I am creating an EA where it checks the Close[0] to either buy/close/sell. My question is because bar 0 is not fully formed yet, is the Close[0] considered as the ask/bid? Or is it only considered a Close once the bar has completed. I need to know because if it is only considered a close once the
Good day. I have this Code in my EA that uses SymbolName(index,true); and I am getting data that doesnt represent my market watch. I created a Script that uses SymbolsTotal(true) and also i get inconsistent data. Thjis is What I am getting and this is my Script
  renko
i downloaded renko to my mt4 and when It is installed it is offline? Can anyone help
[Deleted]
I am more comfortable working with dark color bars on a white background. If I right-click on a chart and click "Properties", I have the option of changing to a different color scheme (in my case I prefer "Black on White"). However, I find myself having to do this for every new chart window that I...
I want to detect the current order was closed and total order is decreased. static int intOrdersTotalCurrent = OrdersTotal (); int intOrdersTotalPrevious = intOrdersTotalCurrent; intOrdersTotalCurrent = OrdersTotal (); if ( intOrdersTotalCurrent < intOrdersTotalPrevious ) { //
I have 4 errors and 2 warnings in my code need help with it big time been looking at this for a few days now and i cant come up with the solution PLEASE HELP! errors are 'while' - semicolon expected, '&&' - operand expected, ')' - unexpected token, and lastly 'else' - illegal 'else' without matching
while ((MovingAverageValue200 > PriceAction[i])&& (PriceAction[ 1 ] Close[ 1 ] <= PriceAction[ 2 ]Open[ 2 ] && PriceAction[ 1 ] Open[ 1 ] > PriceAction[ 2 ] Close[ 2 ] && PriceAction[ 1 ] Vol < PriceAction[ 2 ] Vol)); { //sell order = OrderSend ( NULL , OP_SELL, 0.01 , PriceAction[
How to Download free Indicator from the MT4 website list of indicators?? and How to instal it on Metrader MT4 platform? Please help, thank you
I'm trying to wrap my head around how to code the worse Fall (or Rise) of a Price within a Single Day (or Week); and the Maximum Retracement associated with that period. Also, along with the worse fall, I'd like to know what's the average retracement on a Daily (or Weekly) Instrument. I'd like the...
  Last trade profit/loss?  (11   1 2)
Hello, Is there any other way to see whether our last EA trade is profit or loss other than : string last;for(int i=OrdersHistoryTotal()-1,i>=0,i--) { OrderSelect(OrdersHistoryTotal()-1, Select_by_pos,MODE_HISTORY); if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic) { //for buy...
I want to write a code for an expert I want him to stop trading after 3 losing trades or after 3 winning trades
Hi, here is my code for which I have this problem, but I don't understand why you give me this in the end which in a nutshell only fits me long and not short if (currBars != Bars >Nearest_Up_Level && Nearest_Up_Level && checkMA( 0 ) && isAvailableOrder()) { double lot =
Hello All, Let me ask, I'm a newer in MQL4 and learnig to write EA with 2MA crossover. The result is that both Buy and Sell orders are issued. How to solve it, only buy or sell? Buy when MA1>MA2 and Sell when MA1<MA2. Thanks in advance. Kiae
Hi programmers, Hope you are having good days. I have a problem which I can not find my mistake, could you please point me the problem with this? It would be greatly appreciated if you give me a hand. #include "TicksInfo.mqh" CTicksInfo ticksInfo; input string AllPairsStr = "EURUSD,GBPUSD,NZDUSD" ;
Looking for feedback on this code. As of right now it complies but it doesn't execute trades in the strategy tester. Any help is much appreciated double SARValue; double SimpleEma; double Candle; double Candle2; void OnTick () { if (( OrdersTotal ()== 0 ) && (SARValue > Bid) &&(Candle <