Expert Advisors and Automated Trading - page 199

To post a new topic, please log in or register
A Multi Currency EA. In "OnTick" I have loop that tests if a new bar has arrived . ThisTimeStamp and LastTimeStamp are datetime ThisTF is ENUM_TIMEFRAMES and is set to 15M I am running the EA on a 5 Minutes chart. On MT5 the loop runs every 15 minutes. On MT4 it runs every 5M (Or whatever...
Hi, I Back-tested my EA, took 2 days. When the results came out, I selected one of the Optimization test outputs, entered the input values into strategy tester and tested it. It worked. I restarted MT4, using the same inputs, same chart, same time frame and intervals - I get quite a different...
Dears, there are many articles concerning newly built EA trailing stop classes, but 4me the MTx built in function would do! Is there any way for an EA (calling to internal .dlls etc) to call the INTERNAL trailing stop as the user would do with the mouse on the terminal screen? Best REgards Hans
so, ive noticed this quite a few times - i do an optimization of an EA, i randomly pick a result that has used specific settings, and profited the tested time period, but when i launch it to see either visually, or without - it fails, thus not representing the result given by optimizer. genetic...
Hi, MT4 question. I wonder if somone has a script or EA that can be set on the terminal to watch the "My funds/credit", and if the funds will get smaller than for example 1000 USD It should disable autotrading, and then closes all open trades.
Hi, I'm being told that the tester for MT4 cannot be used to test "past live" results. This is what I mean: I buy some EA and I optimize it for a period from 1 year + 6 months ago to now (2015.4.14). Now, I could start the EA but instead I wait a month. It is now 2015.5.14. I did nothing to the...
Hello, Whilst reading through the MQL4 book, I downloaded and tried to compile the example .mq4 and .mqh files from the section called Structure of a Normal Program (http://book.mql4.com/build/structure). Unfortunately compiling it causes a series of error messages. I suspect this might have...
hi there, guys! i have this little piece of code here that does the following - records your balance, and once equity reaches a specific percent growth over that mark, it closes all trades. could some one maybe edit it just a bit so it would do the same, but in the opposite direction? if equity...
I have an ea that refers to the current timeframe for most actions, but also looks at a larger timeframe for one of the indicators. When back testing on the current timeframe it looks at the bigger timeframe automatically and uses this info as it should. When testing in demo account it does the same...
  EA Transfer (5)
Please I have an EA am using in demo trade. How can I can I transfer the EA to my real trade?
I know it is rather MQL4 question, than MQL5, but i know many developers are doing conversions from MQL5 to MQL4. After recent modifications it is pretty easy, but there is one catch. New MQL compilers (both from MT4 and MT5 that are similar) whilie compiling MQL4 strategies dont put the comments...
please handy code to open order buy 10 pips or 10 ticks above the current open order,please help me see what i have done so far but it seems as its not working as i want. if( ma1 > Bid + (10*Point)&& CurrentTime != Time[1]) { Opn_B=true; } CurrentTime= Time[1];
I submit one limit order 1: Limit Buy: 2 lots at 1.08000, TP 1.08200 order 2: Limit Buy: 1 lot at 1.05000, TP 1.05200 After the limit prices of both above two orders triggered, server uses arithmetic mean to actually combine the take profit prices into one. I believe the mean method...
Hi, in my last post I asked how to change barcount in my ea code to something more reliable but was told that the barcount was fine in my code.. So I'm going to leave that now. I now have an issue with this code though. It is great and works perfectly to choose when to start and end the trading week...
  TimeLine (1)
Hello, I am looking for a way to ensure that my EA is running in a 15 Minute Chart because the tests I want to do is for a 15 minute time frame. I found an example of the ma (ma.mq5) but all the comments are garbled, so if someone can please point me to a good example. Thanks in Advance
Hello, Is it possible to code and back test an EA in mt5 that has 20+ currency pairs? I do not want to test the currency pairs individually, I want to be able to optimize my indicator settings over all currency pairs at one time to achieve a universal set file. I understand that I would need to...
hello happy people :-) i would like to know if there is shortcut keyboard/ or if someone have a panel/ or code to add in your EA, to set quicly the : Long only, Short only or Long & Short position ,and the allow livetrading true/false , that we can find in the common tab i want with any EA to...
Hi traders and coder. I have a dilema of choosing between external data and broker's own historical data. The reason behind this is that broker's own historical data only provide me 30% modelling qualilty plus broker's own histrical data only goes back to 1 year. By downloading historial data from...
In my opinion, successful method is: - Follow the trend - Use stop loss - Let profit orders go
Hi hi, The point is the following: I use RSI to buy or sell on EURUSD. Many orders can be opened when conditions are fulfilled. So I can have up to 10 or 20 opened orders, but always on the same side (buy or sell). I would like to calculate the average price for these opened orders, and define...
Hello forum, good day. How can the lowest/highest point in each of the previous wave of a Moving average be detected counting from the current bar in MQL4? In other words, it would be like getting the support and resistance levels of a Moving Average instead of getting them from the price levels of...
This can not be a problem but I have not found a solution . for example EA open buy position with this code : cTrade.PositionOpen(symbol,OP_BUY,Lots,LastTick.ask,LastTick.ask-(StopLoss*Pip),LastTick.ask+(TakeProfit*Pip),order_comment_1); next EA open sell position with this code : cTrade...
please can some one help me with this script code,i have try everything yet not yet fix please i want this code to close all my open order one order is modified ,my code......thanks extern int tp= 200;int start(){double spread=Ask-Bid; int Ticket=OrderTicket(); //...
Hi, When I create a MA by code and apply it to (let's say) an ATR, it's presented as expected during visual strategy testing. CiATR atr;atr.Create(_Symbol,Period(),14);CiMA;ma.Create(_Symbol,Period(),21,0,MODE_SMA,atr.Handle())); But when I try to apply it to a CCI, it's presented in...
In MT4, there exists a stage/state: when we switch from AccountA to AccountB, when Connection is established and init() and start() are triggered by MT4; but before the "blinnnggg" (sound) when all the historical/outstanding trades are loaded from Server. Switch Account>Establish...
1. I could not understand when _stopFlag is true. I have a trivial code for seeing its effect, but nothing happen with the following code when I try to remove EA from the chart. How can I see its effect, could you please give me an example? void OnTick()  {...
  First Bar H1 (2)
Hi, looking for some EA that starts with first bar of the day H1 - It means, it will place an order after first bar (H1) close. Buy at maximum or sell minimum . I'm still do not know how to create one ..not sure if it is simple or not..but, I will try ... however, parallel -..would be nice if...
I have bought a number of EAs on MQL5, and I have installed them on my MT4 running on my VPS. My question is, if I upgrade the RAM and the number of cores on my VPS, will my prior EA purchases be invalidated because the "hardware" has changed?  I hope it won't reduce the number of downloads I have...
Hi, i want to start a discussion of a topic that came into my mind while reading some articles about the latest gadgets which are offered on kickstarter.com and indigogo. Does it make sense or may it be useful to have a possibility to start a crowdfunding campaign for an Expert Advisor or...