i`m having some trouble with a piece of code for an EA after changing the original code generated by MetaEditor the tester kept giving error on the periods, so i changed the code to: //--- Creating filter CSignalMACD CSignalMACD *filter1= new CSignalMACD; if (filter1== NULL ) { //---
I found this Expert in Codebase ( https://www.mql5.com/en/code/11649 ). The author has not been available since 2019. I love the expert for all its features: works on all active charts from a single chart; it is able to treat each chart separately; and very simple. The only set back is it does not
On my brokers trading account I have a 50% stop out call, meaning, that when my DD will reach 50% of my balance the trade will be closed with 50% account loss. When I am back testing Expert Advisors in my meta trader I can see a position called Equity Drawdown Relative. QUESTION: if my Equity
Good night people, I am developing a robot to read the last closing value of many assets. Test to obtain or close 1000 different assets, but the MT5 is very slow and uses 100% of the CPU. Even stopping or robot, the MT5 continues to allocate 100% of the CPU. If you run a test with 200 assets, it
How to read value of the function CheckPatternAllBullish() in class CCandlePattern ?I want to read it inside in void OnTick()// Print(fican.CheckPatternAllBullish());Error is invalid pointer access in 'candlepatterns.mqh' (162,20)Thanks...
EXPERT ADVISOR IDEA USING FRACTALS This idea i a very simple idea which needs someone who understands coding EA's to a degree. The EA Uses Fractals and thats it. The Only Difference is that it doesnt trade tops and bottoms but trades every candle after the Fractal has painted. Example. Price is
Hi guys. So ive been trying to get the total loss/profits of my executed trade and i don't even know how to go about it. I thought i could modify this code. I got it from the mql5 codebase but it only gives the total loss/profit for pips. I need the total loss/pips in dollars
[Deleted]
I'd been currently been testing ea to trade, but I do not want to open new one after passing certain price. Is there an ea that does not affect my other ea except stop opening new trade after certain price? Or maybe stop auto-trading ea in certain chart
Hello, maybe someone can help me with extraction of data from ZigZag indicator ? I tried this, and it gives Handle=10, bf=-1. zig=0, zag=0. double array[]; //data array double bf;
The essence of the EA is to set certain combinations of candles. The rules are: a bullish candle means "1", a bearish candle means "0". So, it is possible to search for such combinations of candlesticks simply by specifying "101": So far the problem is in coding the representation of combinations -
EA may have several market orders open at any time, each order has its own indicator set stoploss value. To trail the same fixed distance from market for an order with SL = 10pips, and one with SL = 150pips is just "stupid". Trailing must be done proportional to the order's initial SL. Problem is
Please advise me how to use 2 Average True Range indicators for scalping on short timeframes. Suggrstions welcome. Thankyou
I've been looking for a few hours now but I cannot find documentation on Selection of Input Parameters when testing my EA. See attachment. Where can I read about these individual settings so I can understand if I need to use them in my testing? Thank you
Hi guys, I've been stuck at this problem of Icustom in MT5 EA returning 0 values all the time. All i wanted is to call previous Bar value from a indicator buffer . The indicator data window shows accurate values but when called using Icustom in EA it returns all 0. Ive read and studied on using
I know I can go into debug mode and then set up break points in the code, however I was curious if I can set a break point at a certain time in the chart (for example 6 Apr 11:50). Is it possible
I am struggling to find a way to make the horizontal line only start from the bottom of the candle and go out 4 bars instead of infinite I also don't know how to place horizontal lines at each of these conditions instead of it repainting, I would like it to hold its location and just spawn a new one
Hi guys. Im kinda new to coding EAs in Mql5. But i am trying to get the absolute values of variables, mainly my 'Loss'. I know that the MathAbs() function can solve the problem but i don't know how to execute it. Here is where i am at: double Loss = (1 + total pips for loss) double MathAbs ( double
Hi! When there is no new servidor data my code doesn´t seem to work: datetime timeCandles[]; datetime time = D'2020.07.10 15:30' ; //+------------------------------------------------------------------+ //| Script program start function |
So i try to place an order with mql5 it gives me an error 2020.07.10 13:25:30.158 2020.01.03 17:32:36 CTrade::OrderSend: market buy 1.00 @EP sl: 3016.35 tp: 3022.55 [invalid stops] double SL = (Ask - 2.4 ); double PT = (Ask + 3.8 ); if (price > above) { if (runningmacdsignal > 0 ){
Any help would be much appreciated. //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick () { //--- // Ask & Bid double Ask=
hi all, I'm a new member, Can you help me how to create an application for auto trading on MT5 ? Thanks all you
#property copyright "Adam"#property link "https://mql5.com"#property version "1.00"int bbHandle;void OnInit(){ bbHandle = iBands(Symbol(),PERIOD_CURRENT,20,2,0,PRICE_CLOSE); }void OnTick(){ double upbb[]; double lwbb[]; double mibb[]; ArraySetAsSeries(upbb,true);...
I've been trying to check my open trade if there is an open trade then dont trade , i only want one trade to be open, I also wanna create a buy order but it doesnt work it gives me i "2020.07.09 18:11:45.128 2020.01.03 17:36:15 CTrade::OrderSend: market buy 0.01 @EP sl: 3017.35 tp: 3023.35 [
I'm writing an Expert Advisor that closes trades on his own, given a stop loss or a take profit using OrderSend. double tp = price + point * slTpDeviation; request.tp = tp; OrderSend (request,result) I have a boolean variable, that depends on whether or not the agent currently has an active trade or
Hi there, this code is triggered 4 times when I'm closing one position. It's important for me to do ( // do something ) in the following code only one time. But how? void OnTradeTransaction ( const MqlTradeTransaction & trans, const MqlTradeRequest & request
Hello everyone! So I have a stop loss check in the Ontick function like this: Some part of the code is hide away for simplicity. //+------------------------------------------------------------------+ //| Expert tick function |
[Deleted]
I'm working on an Expert Advisor which sets the filling type on orders according to broker's available types. I'm using CTrade class for opening positions. CTrade myTrade; bool IsFillingTypeAllowed( string symbol, int fill_type) { int filling=( int ) SymbolInfoInteger (symbol, SYMBOL_FILLING_MODE
My code below draws a rectangle based on certain conditions. I want to add another condition for drawing the rectangle. The rectangle is drawn from the open to the high of a bullish candle with index (i+1) as shown in the code. How can I tell if : price has already reentered the region price has
Anyone see the optimize parameters disabled in b uild 2458 ? No matter what setting I put in backtester the optimization parameters are disabled. Cannot select expert and cannot change optimization parameters
Problem with my EA is how order send works in MT5 Order send is generating a error as follows Takeprofit & stoploss are set to zero / Start balance is 1000, leverage is 1000 , and here is the code #include <Trade\Trade.mqh> #include <Trade\PositionInfo.mqh> CPositionInfo position; CTrade trade; void
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.