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
How can I detect if account is real in strategy tester? AccountInfoInteger(ACCOUNT_TRADE_MODE) always returns ACCOUNT_TRADE_MODE_DEMO for my real account in strategy tester but in live trading it returns correct value. Testing on Roboforex MT5 account
I am trying to simulate slip by I change the delay setting from 0 ~500 ms , the result always between 0.00000 ~ 0.00003 ? It's far from real world trade with broker. EURUSD ,2020/01~2020/04 Is any thing I miss? MqlTradeRequest Request = { 0 }; MqlTradeResult Results = { 0 };
Deal all, I am trying to optimize my EA that uses a dll. I have read that I can't use local network or cloud network agents when using dlls: https://www.metatrader5.com/en/terminal/help/algotrading/strategy_optimization The issue I have is that I can neither use more than 1 local agent (out of my 4
First of all thank you for all traders and EA builders who read my problem. I have faced problem to create EA. That is: How to create series?. If current close price is higher than previous close price cond1 series takes 1 value, else cond1 takes 0 value
So I have created my EA and am running it now as paper trading. In order to understand how it behaves does it contain various Alert() statements in the code. This helps me to understand when it detects certain signal changes, when it takes trades, print error messages (if any), how the account
Hello guys, Iam pretty new to this MQL5 coding, but I manage to make my own EA in last 3 days and it seems to be working very well. Iam now fixing some issues to improve the EA. My problem is that when is one trade closed by stoploss then alogirthm open new trade in current cadle (if coditions
Hi !
I'm wondering how to do that ...:/ the warning appeared @ the last update
//--- preparing a request MqlTradeRequest request; ZeroMemory(request); //--- placing an immediate order request...
I want to copy (follow) a signal without closing my existing transaction after subscription to trade signals (when the synchronization is done). Generally when the synchronization is achieved existing signals are automatically closed by system and we lost money. I would like to continue to carry out
I'm wanting to use MQL5 virtual hosting to run an EA I purchased in 2016, but when I try to set this up it fails with "Migration to virtual hosting failed: old EX4 file version." Then it tells me to recompile the EA and migrate again. But I am not the EA vendor -- I don't have the source for it
I am doing a lot of testing with an EA based on MA crossover.. and it seems that whatever I try to add, (a condition / indicator) it affects the results negative in stead of positive.. a lor less profit and more drawback! Who has the same experience? Is the simpler EA most of the times the better EA
im new to coding mlq5 and as a beginner i tried to make a EMA (exponantial moving avarage) bot that shows a BUY comment when the price was going under the 50 EMA line while the 50 EMA was above the 100 EMA and the 150 EMA. even though there is no error in the code in backtesting it does not show
Hi Apologies if a solution has been posted elsewhere, grateful if anyone could point me in the right direction. (Also The problem encountered is that I'm trying to extract the values for an indicator, the stochastic oscillator in this instance. However the values returned are outside of the expected
Hello and thank you for reading my enquiry! I am programing an script that analyzes all the symbols of market watch in all the temporalities using a custom fractal indicator. The problem is that the indicator function iHigh and iLow will return 0.0 if the specified symbol is not opened in a chart
Hi my friends, I'm working on one indicator that can show last status of one specific indicator. and I'm really struggling with it. is there any body to help me with that? Ok lets me explain more about it. this indicator scan market watch symbols and if last signal of our predefined indicator(for
I would like to get the number of candles from a specific Date/Time to now. The idea is to get the lowest and highest price from candles since my Date/Time of entry. When I try to subtract my Date/Time from now (TimeCurrent) only the time seems to work: CandleRange = (Now)2020.04.24 15:33.45 -
[Deleted]
I'm trying to calculate lotsize based on risk percentage, but CheckOpenShort is returning 0.0. Also, is there a way to have it return two decimals? Here's an example of what I'm trying to do: #include <Expert\Money\MoneyFixedRisk.mqh> MqlTradeRequest request; request.price = 1.00000 ; request.sl =
Hi all, Can someone please help me with my trailing stop? I have three different levels: 1 - Stop loss following at Moving Average 2 - Locking in Pips 3- Trailing The function works but seems to break at some point and only work if I reload the EA. How can I ensure that the EA looks at all the IF
Hi, How can I load data on chart multi timeframe? I using indicator muti timeframe, problem is high timeframe not found data becuase no data on chart with error 4806 (allway) Indicators ERR_INDICATOR_DATA_NOT_FOUND 4806 Requested data not found this happen all time on first time using EA How I fix
hi all ... I need an EA to test (back test) simply the price. example: enter long at this price ... TP always sets the price and stop loss always sets the price, the same thing for sale. who can help me out? THANK YOU
Hi, I have this .NET DLL that I made, called TradingSystem.dll, and I import it into an expert advisor in MT5 running on Windows 10 x64. The EA code looks like this: #import "TradingSystem.dll" void TS_Initialize(); #import int OnInit() { TS_Initialize(); return(INIT_SUCCEEDED); } The .NET
Hi, im having a problem on limiting the numbers of the Orders that my EA makes in the same candle. I attached the print showing my problem. I want to do something like: input int max_orders_per_candle = 2; if(TradeSignal==true && orders_in_actual_candle<max_orders_per_candle) { //now i execute the
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.