MQL4 and MetaTrader 4 - page 110

Good day, Suppose my first indicator is as follows //+------------------------------------------------------------------+ //| One.mq4 | //| Copyright 2022, MetaQuotes Software Corp. | //|
Auto Close/Reset/Restart all positions when some profit is done Hi Everybody, I use many martingale MT4-EAs. Many times there is situations when the current Profit(because of still open negative positions) is negative but the current Equity is higher than the time when last martingale cycle was
Hey! Im having problems with the ModifyOrder(); I have my strategy that sends Shorts and Longs of 2 kinds each, and when its come to a certain point, I want to modify the SL to the Open price. I think the problems comes when I call the trade open in the next way. ( OrderSelect
Hello, In OnTick() function of my EA I have if statement to check an entry condition such as if ( iMA ( _Symbol , PERIOD_CURRENT ,ii_MAPeriod, 0 , MODE_SMA , PRICE_CLOSE , 1 ) < iClose ( _Symbol , PERIOD_CURRENT , 1 ) && iMA ( _Symbol , PERIOD_CURRENT ,ii_MAPeriod, 0 , MODE_SMA , PRICE_CLOSE , 2 )
I have changed xml files and made black version of metatrader4 on Android. I begged the developers for a year and I got tired of waiting, so you can see the results here. If you need I can make a clone of the app, so you can have installed two version together, just ask me
When I change my phone ( Xiaomi ) to Dark Mode and open Mt4 app, background menu in symbols is broken. Please tell me how to fix ? Thanks
hello, i apologize if this question is too elementry for some of you. i have resently found out that Tick and Point are different. and i can not modify my order if it is not more than a Tick. (i get error 1 , for not doing that currently) in mql5 we can call TickSize() to get the size of the Tick in
I wanted to ask if anyone knows a risk management program for MT4 which is able to do the following: I want to be able to set a fixed stoploss x pips under/above my entry before entering the trade WITHOUT having to drag a line. I also want to be able to set the risk per trade so the program
  Unexpected order  (21   1 2 3)
Hello, Among other conditions this condition has to be true in order for the EA to place an order. However, this condition isn't true and the order is placed while testing! iFractals ( _Symbol , PERIOD_CURRENT ,MODE_LOWER, 1 )== 0 What is wrong?!! Result picture is attached to further illustrate
Hi all! So i have been trying to implement a simple trading strategy based on a custom indicator. If "Forexprofits" prints any value then go Long, if "Value 2" prints anything then open a short position and close all long positions. (attachment 2) Unfortunately, although I think i applied the
Hi guys, I am using several accounts at different brokers and I run them all off one terminal. I simply pick the broker/account I wish to log into from the navigation menu of the left. MT4 stores all the accounts in an account file in the config folder. I am able to simply copy this file to another
  MetaEditor  (4)
Hi everyone. I was trying to write an script in metaeditor. i wrote the four basic mathematical operations but when I apply the script on chart, the window for input isn't appeared. Despite I add the code #property script_show_inputs. What should I do
Hi! I have recently found out that indicators can be loaded in EA as a resource. I was wondering if include .mqh files can be loaded in the same manner
hello, i know how to return the value of an indicator in a Bar that we know the shift number of it. but what if we dont have the shift number. for example: i want to find the highest amount of Standard Deviation in the last 20 bars. how do i do that? if it was an indicator like Moving Average we
Hi everyone. I'm learning code and i need help wiht AO. I want check when AO valeu = 0. and before that AO is red bar or greenbar I write this double val1= iAO(NULL,0, i); double val2= iAO(NULL,0, i+1); if ( val1 == 0) if (val1>val2) ....... is that right ? or something wrong. Please help me. I
A link I used some years ago to access the MT4 forum directs to a broken link message. Cannot find any link on site. Is the MT4 Forum discontinued ? If its now MT4/Mt5 combined my MQL4 question is :  MQL4, is 8 still the maximum buffers or has it increased ? Thanks in advance. EDIT: Just seen it...
[Deleted]
  Highest Bar MQl4  (7)
There is Highest Bar and lowest bar in MQL4 but how would you program highest ATR value. int HC = iHighest ( _Symbol , _Period , MODE_HIGH , 100 , 0 );
[Deleted]
  Range data  (2)
If i want to count how many times a price range has been hit; what would I need to add to the for loop in order to do this? So, capture the data within the blue areas ever hour. also what tick data would i use for array access? int RangeData() { double TickData[ 1 ][ 5 ]; for ( int i= 0 ; i<
[Deleted]
The Comments function draws a simple text line in the upper left hand corner of the chart -- sometimes even on top of another indicator's comments. How would I draw two lines, one beneath the other (as if there had been a carriage return)? Or, said another way, "How do I position Comments on the...
hi guys, just wondering, do you guys know how to make EA only trade once every signal? for example, if RSI reaches OB, and stop loss is 5, suddenly the bar went 500 down, and there will be 10 trades.... it just keeps opening new position. 
Hello, Are there any way to set Mt4 account trading only with EA tradings. I want to disabled to trading manually. Is that possible? Best
Any help will be much appreciated
It's something I've noticed over the past few years, is it that MT4 is not much different? Personally I prefer the slightly updated GUI and pointer to chart accuracy of MT5, but loading back data on charts seems a little slower
Hey guys . as you can see this indicator has the option to Alert on current bar , but it doesnt have the option to show arrow on candle open or when the alert comes . how can we make this indicator show arrows when it alerts on current bar ? thanks a lot #property indicator_chart_window #property
Hi I'd like to open trade on the open candle, to do that I use this code to detect new bar formed from earnforex: datetime NewCandleTime = TimeCurrent (); bool IsNewCandle() { if (NewCandleTime == iTime ( Symbol (), 0 , 0 )) return false ; else { NewCandleTime = iTime ( Symbol
Hi All, After installing an EA, i get the error "Cannot Load 'Metasetup.dll' [126]" in the experts tab & the bot ist not executing. Also 3 times new (plain) re-installations did not help. Unfortunately I got no solution from support so I am wondering, if someone from your end also experienced this
[Deleted]
Hi, How can I detect a double click event on a Chart ? I can do it for a single click using : void OnChartEvent(const int id,                   const long &lparam,                   const double &dparam,                   const string &sparam) { //new logic    if(id==CHARTEVENT_CLICK)    { .........
static int counter; static datetime hour; if (hour!= iTime ( NULL , PERIOD_H1 , 0 )) {counter++; hour= iTime ( NULL , PERIOD_H1 , 0 )II I need to set the counter on 0 every time I close a trade... I tried to do this... but i think when the trade close, also the if statement... if (
hello friend, i make an expert advisor that opens a new chart with the function ChartOpen("US100.cash",PERIOD_M5); , it works great, but when i try to use the expert advisor in the strategy tester it does not work, what can i do? thanks