Expert Advisors and Automated Trading - page 227

Hi there, I'm still new to OOP and MQL5 in general, and I'm trying to find out a way to use arrays and comparing their different "i" values . The idea is to create a "tickcounter", and for every "last tick" compare it to the "previous tick" and see if they were different (bigger, smaller) and...
Dear all, From MQL5 documentation about position properties, I can read this: For each financial security(symbol), only one open position is possible. I have written the following code : int OnInit() { CTrade trade; MqlTick tickInfo; MqlTradeResult result; SymbolInfoTick(_Symbol, tickInfo);
I do not know how to save a variable outside of my if statement in my code: the variables I wish to save are double buyzone; double buysl; double buytp; double sellzone; double sellsl; double selltp; Code is: void OnTick() {//---// Ask & Biddouble Ask=
  String Split  (5)
Good day, May i just enquire if i have a string sent via Pipeline where said string goes as ""EURUSD",OP_Buy,0.1,Ask,2,0,0" How can i split it into using String Split Symbol="EURUSD" cmd=OP_Buy volume=0.1 so on so forth using the following codes void OnStart () { string to_split= "_life_is_good_"
Hello, I'm receiving twice phone notification for same trade transaction, how can I fix it? 
hello, I have a problem with the NormalizeDouble statement. employed on ACCOUNT_PROFIT doesn't always work, I see some bugs. Could you help me understand the mistake?. My code string: double float_profit=NormalizeDouble(AccountInfoDouble(ACCOUNT_PROFIT),_Digits); attached error image
I have a couple of expert advisors stored away in a single profile on mt5, while using other profiles for different analyses. Since they are using OnTick function, do they work in the background or do i have to have the charts they are attached to on the foreground
  MA1 cross MA2  (1)
How do I write an EA so that a buysignal generats an open trade when Moving Average 1 cross Moving Average 2 and a sellsignal when MA2 cross MA1 how to write the cod so that I trade for 10 % of the capital on my account
[Deleted]
//+------------------------------------------------------------------+//| Copyright 2020, Anonymous3. |//| 254loop@gmail.com |//+------------------------------------------------------------------+class CBase
Im getting an error from MT4 platform when i tried to subscribe a signal which my friend published. We are trying to automate our trades therefore firstly we published a signal by a demo account. After that, i tried to subscribe this signal from another demo account but system gets me this error
Hi guy before you all yelling @ me to search i did that i always used OrdersTotal to get Opened Orders! "of course not pending ones" but on V2398 when i try to get that i always get 0 returns i checked with older version it works just fine! tried with MT4 work fine what's going on! 2020.05.04
Good evening everyone, I'm new, I would kindly need help with the following trading system: it starts from the false break out of a level, for example for the short, if I have identified a resistance on the nasdaq at 8840, I would need that the price exceeds a few points (for example 4) the level
  MA Cross  (3)
Hello. I am not a programer so I don´t know how to write an EA that works after this. Open a by when LWMA 5 cross LWMA 1 it shall be on Weighted Clos (HLCC/4) Close this when LWMA 1 cross LWMA 5 And I want the LOT size be 10% of the capital on the account. I have tried to read text on the internet
Hello traders! I hope someone can help me with this... I'm a supply and demand trader with a fulltime dayjob. I finally got the hang of my strategy but the problem is, I don't have much time to watch the charts because of my job. Now, what I want to do is create an Expert advisor that will open
Hi all, I thought I would test out a signal provider and assumed with my limited newbie know;adge that once i'd configured the signal in MT5, it would automatically trade on my account as and when the signal provider traded. However, they have traded today and my account did not follow suit. Am I
I have a EA which after i setup, clicking onto the autotrading button and it turns green and has a smiley face, trade starts running and so on. But after I right click on the server and clicked onto synchronise experts, indicators and signals option, the autotrading button on top turns red and the
Hi, i am having problems coding this simple sentence where we look back X number of candles and take the lowest value. Than take this lowest value and use it as SL in an open buy order. im thining of using this line to find the value Low[iLowest(NULL,0,MODE_LOW,10,1)]. It starts by looking at
Hello I have an EA running but the developer has said it might not be taking trades becuase of the 'freeze' level. I was wondering how I check this and make the necessary adjustments? The EA is a scalper. If anyone could help offer advice I'd be very grateful. Thank you very much
Hello, I am using an infinite loop with a "Sleep" on my "OnStart" because I want to keep track of my positions at all time. The program works great so far, however, once I stop it, the "Sleep(5000)" (which is 5s sleep) seem to brake, and my infinite loop is getting called thousands of times in a few
struct myMqlTradeResult: MqlTradeResult {public: bool isSuccessful; };//+------------------------------------------------------------------+//|
Good morning, please can you give me information about EA or Robot to manage brokerage operations? Thanks
Hi guys, with my EA I would to know the profit about the 5 last close position, but I have a question. Why this one works if(OrderSelect(OrdersHistoryTotal()-5,SELECT_BY_POS,MODE_HISTORY)) { Print("Profit is ", OrderProfit()); } else Print("OrderSelect returned the error of
Team, I understand that the equity curve in the strategy tester shall indicate the correct amout of margin and actual gains or losses that would be booked on a trade account. The equity curve would deviate from the account balance curve whenever positions are hold overnight. If that is correct, then
I'm trying to do the first tests with my new multicurrency EA, but the tester makes an error and the test doesn't start. The mistake is this. Basically, I'm trying with only two currencies and there is a problem loading the second currency indicator. Where did I go wrong? 2020.05.01 21:45:25.428
Hi all. Please help to add limitation for per bar/signal. Currently it opened alot of order per signal (buy/sell condition). Thanks alot #include <stdlib.mqh>#include <stderror.mqh>extern double SL_Points = 10;extern double TP_Points = 50;extern double Trail_Points = 10;extern double Trail_Step =
Hello, I'm having a stupid hard time setting one position by signal. Signals are both buy and sell. They're based on 2 strategies : flat & trending (which I got inspired by one of the incredible articles on the site). What I did is setting magic numbers to track which signal created the trade : int
Is there a tool for me to set trailing profit? It should move like trailing stop in reversal. Instead of changing the stop loss level, it changes the take profit level. Example: If buy position is 1.08273, and I set trailing profit at 100 points and take profit at 1.08300. If price is at 1.08173
long chartID = 0; string msg = ""; chartID = ChartOpen("GBPUSD",PERIOD_M1); //msg = msg =+"chartID = "+IntegerToString(chartID); string mysymbol = ChartSymbol(chartID); long pixelvalue =150; if (ChartSetInteger(chartID,CHART_WIDTH_IN_PIXELS,pixelvalue)== true ) msg = msg +"\ntrue"; if
Hi guys, i have got an idea to break losing streak of a trading system. lets say we have a 4 consecutive losses, then we will skip two trades after first losing trade. is it possible to code such thing? only disadvantage iam seeing here is you miss two profit trades if you dont have a streak after 1
I Need Profitable Scalping EA , Please Help Me