Expert Advisors and Automated Trading - page 169

Hi, I'm developing an EA. Part of the EA is to check if the price is closed above a particular EMA. I declared a 'double' global variable as 'EMA34'. Everytime a new candlestick is generated, I reset the value of the variable as follows: EMA34 = iMA(NULL,0,34,0,MODE_EMA,PRICE_CLOSE); When I test
  MQL5 Wizard  (1)
I am trying to do an EA with the MQL5 wizard. I open the MetaEditor, I open a new instance of Wizard, and I can no longer continue because the "Next" button is disabled. Can anyone help me with this problem
[Deleted]
Dear Members I have come across an indicator which does not have buffer array(s). It has only calculated variables. How can I fetch these values into EA, as iCustom requires buffer number of indicator to copy data ? Thanks in advance
[Deleted]
Dear Forum Members I have created a class to calculate Camarilla Pivots. It does calculate for the first day of running it, but then it same first days values, when Get_Pivot() method is called on IsNewDay() in the EA . Please help me locate the problem in the code. EO 0 13:21:53.875
Hi, I'm new to Forex, and I'm adapting my Day-trade EA to Swing trade on Forex (Exness Broker). What I know is that Forex closes during weekend, right? I don't really understand if I can't operate during weekends. If so, That would result on false results and reports while I'm doing backtests. As
Hi an amateur here As the title goes I would like to know if there is any possibility of using an ex.5 file indicator to reference using the iCustom functionality in EA scripts to be written in MetaEditor4. I currently use MetaTrader4 and thought to retrieve values using iCustom from an indicator
In the agents tab all cores are "ready" and enabled but I can only select one of them, it doesn't give me the option to select more than one core. I searched everywhere but couldn't find any solution
Hello MQL5 community Can someone please help me, by example; how do i close an open trade, either through a function or TP amount? I tried this: double myAccountProfit = AccountInfoDouble ( ACCOUNT_PROFIT ); double myAccountEquity = AccountInfoDouble ( ACCOUNT_EQUITY ); if (myAccountEquity -
  EA Rename EA  (2)
Hi, It is possible to have a EA to rename a .EX5 file? Or copy/move a .EX5 file? I tried but got no success
Whenever I use S tart/resume debugging on Real Data button from MQL5 Editor, expert or script initiates on EURUSD / H1, I have closed All chart even then its same. Is is possible to change this
hello guys can someone please send me a mq5 code where all current opened trades close when daily total target profit has been reached(as an input) ,then the Ea opens new trades the next day ! thanks
  One trade per bar  (24   1 2 3)
Hi there friends, I've coded another algo <Deleted> but very poor in demo account . I think the problem besides on making several trades over the same M15 bar, this is why I need some help to find the condition to only trade once per candle. Any help would be welcome
hello, so my idea for an algo is pretty simple: I want to buy if two sma cross and i want to close my position and open a sell when the 2 sma cross from the other direction. My probleme here is now that, my algo is not very accurate. The sell or buy happens after one or two candles after the
1. Can anyone tell me is it possible to get historical fundamentals data of each currency for last 15 years atleast?? 2. Is there anyway we can backtest this fundamental data with our expert advisers? 3. Is there any ready made indicator or expert that uses fundamental data
Steps: 1. Define the property like this: #property version "1.00" 2. How can I get version from code? Like Print("Current version: "+property.version)?
  EA  (6)
Hi All, I have a question and would like to ask the forum if any one can help. I am a prop trader and now want to add my EA to my trading. The prop firm i work for has a rule that trades must not be opened or closed 2 mins before and 2 mins after red news events. Now i know i can turn off Auto
for the experianced mql5 programers and the beginners what do you find more proficient for (testing - deployment - robustness of the program i.e. recovery form fatal error) Using Strategy Modules or skiping them and structuring the ea on your own (using other classes from standard library of
  macd indicators add to ea  (42   1 2 3 4 5)
Hello, there are 2 lines of the macd indicator in the picture. If the difference between these 2 lines is more than 0.00050, I want the position to be closed. I don't know how to write the codes. Can you help me
Hi forum-ists, I need “trial an error” to get a line or indicator panel of the incorporated indicators to show up on the visualized chart. Used: Indicators, here ATR am MA (see enclosed source code). Working in the visual mode and visual mode-box on. There are NO templates of this form in the
I want to open an order, no problem with that, but if I want to close this order, I need the ticket number, ticket that I can't write manually, it will be given after the order is opened. From the documentation , I've got this: but I can't pass anything else than 0 to "position": 0 (line 20)
I had backtest my multisymbol EA using strategy tester . The code below is suppose to check if the symbol has already been placed under pending order, it will not allow trade for that symbol. However, when I select, eg. "USDEUR" or "USDCAD", to back test at the strategy tester. only the selected
Hi! I'm trying to code an EA but this "CopyBuffer" function error won't let me continue and I don't know how to solve it. CopyBuffer return error 4806 (ERR_INDICATOR_DATA_NOT_FOUND) I am thinking that the iMA () function may be faulty because CopyBuffer () works fine with iBands() and iADX()
[Deleted]
Hi I am using NormalizeDouble() to set results = _Digits. However, many times it returns greater number of digits e.g. H1 [0] 0.0154 [1] -0.009350000000000001 [2] -0.03228 [3] -0.0189 !!! Is there any way to control this
Hi, I am looking to use a linux VPS for MT5 terminal and have a EA that that was purchased in the Market. The concern I have is if I am able to easily apply any updates that the developer makes to the EA from within MT5. Does anyone have experience with this? Thanks
hi I have an EA, and the SL should change (with a parameter that chages in periods)... but dont know how to do that because the sl stays fix ??? edit: how can I make diferent trailing positions for each value that changes each period
[Deleted]
UPDATE NOTE: the issue is resolved ... Dear Friends I am trying to develop an EA, based on Strategy BaseClass for MACD and derived class MACD OsMA Cross. When run VWMACD.Refresh_DataBuffer(); all the data are filled in the array(s). However, when trying to run the
  stuck with EA  (2)
Hi I'm stuck with this EA, I have an EA with some lines plotted of the highs and lows, and dont know how to make a order when the price crosses those lines, how can I do that? something changes if the lines are bojects? dont know what else to do what is wrong with this? //if it is going up if
  Best way to handle Requotes?  (11   1 2)
Hey everyone, What is the best way to handle a requote within an EA? I set a deviation but to my understanding that only affects close orders. I need a way to have the EA retry opening an order if there is a requote. I'm using RefreshRates() before every buy/sell order (trade.Buy/trade.Sell) but I
Hi, I just want to ask how can I code this logic: Price between 2 SMA, SMA 20 high, and SMA 20 low. Or something like that, so I can identify a flat market. Thanks
Hello, I am new to programming and after multiple searches I cannot resolve this trailing stop problem. I managed to create a trailing stop but it goes up and down compared to my open price . I would like it to follow the price in one direction. For example, for a buy order, I would like the