MQL4 and MetaTrader 4 - page 265

Hello everyone, So I am running into a problem when developing an EA and I needed some suggestion on how to deal with this problem. My problem is that I need to develop an EA for customer that uses an indicator with a lot of parameters, they are almost 100+. Now I know that I can use iCustom()
hi guys i have a questions i have indicator at end of this indicator i divide two double and after i multiplay for constant 100 why return 100 ????????? if i print a single double return number little like 0.000232335 or 9.88888 but when i divide return always 1 how is possible that
#include <CustomFunctions010.mqh> int MN = 73 ; int shortmaPeriod = 8 ; int longmaPeriod = 200 ; double maxRiskPerTrade = 0.01 ; double lots = OrderLots(); int orderid; int slippage = 10 ; static double longcurrentprice = Close[ 0 ] + ( Point * 40 ); static double shortcurrentprice = Close[ 0 ] - (
Time zone fib no longer can be cloned by dragging original object while pressing Ctrl. Please Fix. Noticed in builds 1310 and 1311
Hi I am trying to have indicator draw a box on chart with X pipsize . Where X is dependent on ATR value for that timeframe for that symbol. I used the following lines .But they do not produce any result. Am I using the ATR multiplier (*100)correctly ? Should there be another number as multiplier for
Hello, I want to make an indicator which will give me an information about 4 Quarters High/Low prices. I have 52 Week range indicator but I'm struggling with 4 Quarter range. I tried iHighest, iBars, iBarshift but I still can't get the info I need. I know I must missing something. All I want is to
Hi guys and gals! How can we open multiple  orders of the same pair simultaneously in the mt4. It seems we need an ea or a robot... is this true? if so would you know of a good one? Rsvp at your earliest convenience
Installed MT4 under Windows Server 2019, API returns 401 error when I try to login to MQL5 community. Looks like a bug
I have been trying to connect my demo account through my broker. I have tried three brokers, & none of them allow me to log in on MT4 with my info! I can on my mobile & web terminal just fine but the I can't get this thing to do this on my desktop version! I checked to make sure I had the updated
Can anybody advise how to RETAIN the color width settings that you select & SAVE in the MT4 platform template? When I change these color widths in an indicator in the MT4 chart & save the new template, on re-opening that chart or moving to a new chart & selecting the saved template the color widths
Hello the EA works very well on all pairs but in US30 it gives me ordersend error 131 : invalide trade volume and order130 invalide stops here is the code #property copyright "Copyright 2020" #property version "1.00" #property strict input string A1= "========== EA SETTINGS ==========" ;
hey folks ..im tryna create arrows to my closed orders history using this code void draw_history(){ for ( int i= 0 ; i<OrdersHistoryTotal(); i++) { if ( OrderSelect (i,SELECT_BY_POS,MODE_HISTORY)== true ) { if (OrderSymbol()== Symbol ()) { if (OrderProfit()< 0 ) { ObjectCreate
hi guys i want draw e EXponetial EMA , but not want use a class inside of mql4 (ima or imaonarray ) therefore i build my class but not draw nothing o_O thanks at all //+------------------------------------------------------------------+ //|
Hello, I have a indicator named "arrow.ex4". I have only managed to do this: #resource "\\Indicators\\arrow.ex4" void OnTick () { double value= iCustom ( _Symbol , _Period , "::Indicators\\arrow.ex4" , 1 , 1 ); } but how can I detect the arrows it draws? When I backtest the EA after I
Which one I Should use, new functions are shorter to type but will it works on metatrader4 older versions? This short terms are on all mathematical functions now is it update? will supporting older function names cancel
hi How can Separate Type of Currency in Mql4 code. for example i want to separate CFD from Forex or CFD from Future ?> what command or function in mql4give us information about Type of symbol. thank you
  log discrepancy  (1)
Hi guys , i exhausted all my debugging skills to try to wrap my mind around this issue but i could not solve it, i found discrepancy in the log so i cant really trust it, for example if im looping from 200 to 1 , the log only show wen counter is 100 and goes on to 1 why is that is there something i
I have calculated what should be SL, position size: https://www.babypips.com/tools/position-size-calculator So it is about 0.79 so 0.79 lots. But for me hit SL after 6.9 pips and loses few times more than it should - 175.48 Why is that
When i want to have the last Course i can write Close[1] but how can i get the last bid Bid[1] is not available, would be very thankful for help (i'm a newbie at the coding)
Hi guys I know that bug fix updates are coming for metatrader4 and, How it happens? Does all metatrader4's that are associated with brokers will get this updates? Will metatrader4 platforms that are with brokers will update too after bug fix
Hi, I'm trying to get time from specific candle like highest price from last 52 candles but it gives me incorrect time, can anyone help me? Here's my code: double Highest = High[ 0 ]; double Highest1 = High[ 0 ]; double Lowest = Low[ 0 ]; for ( int i = 0 ; i <= 52 ; i++){ if
Hi, i need a help.... This is my first EA and i am a beginner... can anyone help me to put Trailing stop for my EA ... i tried many ways but trailing stop is not activating when i am putting it on strategy tester ... please help
hello all, i have a question is it possible to make a checkbox in indicator (not in EA) for mql4 if there anyway please help me
in my robot i check 3 prev RSI candlestick i use this code candel1= iRSI ( Symbol (), PERIOD_CURRENT , 14 , PRICE_TYPICAL , 1 ); candel2= iRSI ( Symbol (), PERIOD_CURRENT , 14 , PRICE_TYPICAL , 2 ); candel3= iRSI ( Symbol (), PERIOD_CURRENT , 14 , PRICE_TYPICAL , 3 ); Comment ( "RSI candel 1 "
  View open risks  (2)
Hi, I'm assuming this is simple to find, but I just can't seem to anywhere. I have many open trades, these are spread bets, not CFDs. I want to see the "open risk" for each trade. e.g. for the trade buy size 1.2 on GBPUSD with an open price of 1.32980 and a stop loss set at 1.35565. I can do the
for ( int j=OrdersHistoryTotal()- 2 ; j < OrdersHistoryTotal(); j++) if ( OrderSelect (j,SELECT_BY_POS,MODE_HISTORY)== true ) { for ( int i=OrdersHistoryTotal()- 1 ; i < OrdersHistoryTotal(); i++) if ( OrderSelect (i,SELECT_BY_POS,MODE_HISTORY)==
  Backups  (3)
Is it possible to back up your charts, EAs and Indicators on MT4? I have lost all the info associated with two demo accounts. Is there any way to retrieve this? How can I prevent this from happening? Is there a way to back up or make copies? Will appreciate some guidance on this Regards, Tania
Hi all! I am new to MQL4 programming , and I have started to learn programming outside the MQL4 language. So my experience is very lacking. Now I am trying to make my first EA that only gives at a alert when something is happening. I think it isn't a huge deal to change the alert to a buy, or sell
  money protection  (2)
Hello all! I need help for my mq4 code, I want that the ea close all trade when total trade running+closed trade reach 5%(different pairs running) I have got a code for that but the ea close trade when closed trade reach 5%, however all running trade are in loss,so it's nothing This is the part of
Can you give me some idea? I have some orders now. I want to know the order (one of them) was closed , then I want to know immediately. Do you have any idea how to know about it by mq4 code