Expert Advisors and Automated Trading - page 244

double currentPrice = Open[0]; double lastPrice = Open[1]; if ( (lastPrice > 52.75 ) ) Alert("Hello"); Hi. I am building my first EA. I want to trigger an action in this case an alert when a candle closes. Exactly: If the price was at e.g. 52.75 at any point during the most recently
Hello there, I would greatly appreciate if you could suggest me if I'm missing something before going REAL. I would like to point out that I am using a Demo Account of the same Broker I would like go REAL with, and I emulated an average Slippage based on my connection. Also, from what I saw, -Spead
Hi there, in have a Comment at the end of each module of the current code I'm working on, and I like to display each one below another. Tried by adding +"\n" at the end of the line but don't actually working, must say it's not a single comment of several lines but some Comments at the end of each
Hi, I wonder if there's any tool out there that can help me accomplish the following. - I have 3 trades going off on the same signal, trade 1 has a target of 30 pips, and when the target is hit I need stop loss moved to the entry for the 2 remaining trades and then trade 2 have a target of 50 pips
Hi All, I'm backtesting my EA, and have been trying to drill down on getting the right entry and exit points. Quick background on the strategy: its a band system based on a moving averages, So when the previous candle straddles the lower band (high inside, low outside), buy on the next candle open
Hi guys, I'm new on MQL programming and just tried to make an EA with an moving average applied to an RSI. Before I continue, I'd like you to check the code and tell me whether I did it right. Not sure whether I have to build an array, hope not... TIA double RSI = iRSI ( NULL , 0 , 14 , PRICE_CLOSE
Is there a way to set the StopLoss of an order to the take profit value of another order when it closes. I would like to set multiple orders with different take profit values, but with the same StopLoss value. As the price changes and the EA must change the StopLoss of the remaining order when the
Has anyone ever used the porotection balance of < product name removed> ? I set it ( parameters attached) and it didn't work, my account burned ... Can someone help me on the settings? Thanks
Hello, I'm running a basic grid strategy and I've set up a minimum equity vs balance so it closes and runs minimum lot sizes if it goes below a reserve but when i get a few good trades in a row my lot size gets so high i'm returning error 134 because its too high for the margin. What i've done is
Hi, is it possible to tell your robot to stop trading after a couple of losses or to open the reverse position? I guess Yes, but I have no idea where to look for such a Code or idea Thanks for ur help
I like the idea of having dedicated classes for money management within MQL5: CExpertMoney and derived classes, especially CMoneyFixedRisk, which allows to defined a percent of risk for a trade (e.g. 2%). I though that these classes are meant as "ready to go" but now it seems to me that they are not
I want to be a signal provider but it say: Authorization failed. Please check trading account data . and the top right corner say: "subscription not permitted" does it bcz it is not on the trading hour?? Thanks
Hello guys, does anyone have simple EA based on Awesome Oscillator, simple rules, swing trading, buy when indicator gets above 0 and SELL when it gets below 0, trade triggered after first closed candle confirm this. Thanks for help. Mick
After the first "Run single test" of a fast genetic optimization, when i choose another optimization result (another pass) to "Run single test", mql5 doesn't start the test. Furthermore, in "Journal", it appears the message: "cannot get input pass [pass_number]" (where [pass_number] is the number of
Hi everyone, somebody told me this trading system and may be even there are EA available out there, Here's the idea, 1.Long 0.01 at 1.6000 and TP around at 50pips (1.6050), if the direction goes opposite way, 2.Short 0.02 at 1.5970 and TP around at 50pips again (1.5920) (Can double the lot...
Hello there, i'm facing an issue when trying to use CalendarValueHistory to get Economic Calendar data. When i get the information inside my EA i got this: But pay attention to the right Economic Calendar Info right from https://www.mql5.com/en/economic-calendar/united-states: My timezone is +3 from
https://stackoverflow.com/questions/58228952/how-to-update-variable-from-with-if-statement-mql5
I don't understand why this happens https://imgur.com/a/qsr36lT (I don't know how to add images) This is the code. Go to the end to see the buy programming. The strategy uses sma, macd and parabolic sar. When the sma crosses a positive candle, the sar is below the sma and the macd is above zero, I
Once a virtual server (MQL5) has been set up on a MT4 platform, when you synchronize the EA's does it sync on all profiles on account or only the one that is open at the time
I thought that defining candles that had bodies 80% bigger than the wicks would result in momentum candles. I found out that this analysis was seriously flawed. Mainly because even in consolidation you can get candles that satisfy my above condition but aren't momentum candles. How can I use the
hello there i have this 2 moving average cross over Robot . first cross is sl and 2 cross over will be trade. how ever i want when the trade open and market move 100 pip the sl should be modify to break even but when i used orderselect outside the if statement it print the value of OrderOpenPrice()
Hi there, need to filter open positions from the pool by its symbol to properly calc its breakeven. Through this code, I can get just values from the chart symbol: If(PositionGetString(POSITION_SYMBOL)==_Symbol){ Also tried this way but makes no sense
Hi, I've wrote an EA using 3 indicators as starting sequences and a TP and SL to stop the placement. Unfortunately my understanding of the mql4 language is pretty new. I found that there where 43 errors in my script and I'm not sure to know how to correct them. Where can I find someone to correct my
Hello Everyone, I would like to know if is possible to add some kind of event when the user press the key tab to jump to the next CEdit object in the panel. I already know how to capture de key press from the OnChartEvent, but I don't know how to manage these objects to create these event. Thanks
int init(){ RealPoint = RealPipPoint(Symbol()); } void OnTick(){ double MidMovingAverage = iMA(NULL,PERIOD_H4,7 , NULL, MODE_EMA,PRICE_CLOSE,0); double SlowMovingAverage = iMA(NULL ,PERIOD_H4,10,NULL ,MODE_EMA,PRICE_CLOSE,0);
  Move a signal subscription  (19   1 2)
I started a signal subscription on an account I was running on my local computer. Since the account has to be running all the time I want to move it to my server and another broker. How? Unsubscribe and subscribe? I have only run it for 2 days so what happens to my paid subscription fee
Hi all. Just poking around in MQL5 for the first time. I thought I'd start with something simple, print to the journal on the first tick of a new bar: //+------------------------------------------------------------------+//| learning.mq5 |//|
When first downloading data for EUR/USD and GBP/USD for backtesting the download appeared to start at 49%. It then produced these errors in the log and did not complete the backtest: 2018.12.23 10:33:34.195    Core 1    EURUSD 2018.02.27 03:23:00: corrupted history detected (s:-2100596776, o:121546,...
  SYMBOL_CALC_MODE  (4)
Hello, does anyone have an idea how to get the calc mode back? here its written, that the calc mode is a part of SymbolInfoInteger https://www.mql5.com/en/docs/constant_indices but i cant use  SymbolInfoInteger(_Symbol,SYMBOL_CALC_MODE_FOREX); any idea? amando
  Help  (2)
Hi, I'm an absolute newbie, and I think I need some help. I need to make a very simple EA, that buys if the closing value is higher than opening value, and sells if closing value is lower than opening value. Please, I know your time is valuable, but if could give it a minute I would really