Expert Advisors and Automated Trading - page 453

[Deleted]
Hello forum, good day. How can a diagonal line be created in MQL4? I need to create a diagonal line (trend line) where the starting point is the Order Open Price level and acts as a support/resistance so I can check if the close price is above or below this line. Your help will be much appreciated...
Hello, am experiencing a little bit of an issue, I was trying to create custom reports using the OnTesterPass, OnTesterInit and OnTesterDeinit functions as explained on this great article https://www.mql5.com/en/articles/746, but I noticed when I optimize my EA on SLOW COMPLETE ALGORITHM and using...
Hi assume that we have this indicator setting: iForce(NULL,0,period,method,price,0); I want to know what is the amount of iForce at Open[0] I searched about it, But I didn't find a result. Thank you
please help me with handy code to open buy 10pips above buy price and open sell 10pips below current sell price do not add ordersend on it i can do that,its just signal 10pips above and bellow open prices. i have try may ask and bid format code yet it seems like its not working.thanks
this is my limit buy order, trigger price is 1.06845. Here is the current price, which is 1.06850, 5 points more than the limit buy trigger price. I submit this limit buy order at the open price of last 3rd bar and which is 1.06845. After that, the price goes down 15 points and my limit buy...
Ladies/Gents What is the difference between the two? can code written for 4 work on 5? As a beginner where should I focus my efforts? Thanks
Hi All I work as a control systems engineer, but have always been interested in investing/trading. However I've never quite found the right community to ask questions, engage my interest and get me over the hump of being clueless to all the terminology and buzzwords used within this field. I
I placed a limit buy order using following code: uint limitBuy(double amount, ulong magicNumber, double price, double tp, double sl) { printf("limit buying %G lot, at %G price, TP %G, SL %G", amount, price, tp, sl);   MqlTradeRequest request = {0}; request.action =...
purchased a signal to meta4.how can i modify it
hi there, every body. was wondering if any one could throw in a line of code to disable EA from trading on a specific day? i, personally dislike fridays, so lets take that for example. so, this is the code - it closes all trades, and restarts the EA if equity has grown. so, my idea is - after...
Hello, how should I make my EA aware that a stop loss has occurred please? At the moment, when this happens, a lot of errors occur because the program doesn't know the position has been closed automatically. Thank you.
Hi, To get the best performance I'd like to get when optimizing the profit in point rather than the profit in money, regardless the lot size. Is there any way to do that ?
+void OnTick()  { Print("OnTick() called");/**///shows acoount leverage in chart windows on the left Comment("Account #",AccountNumber(), " leverage is ",AccountLeverage(), "lot 1 size is",MarketInfo(Symbol(),MODE_LOTSIZE), "lot 0.1 size is",MarketInfo(Symbol()...
int OnCalculate(const int rates_total, // number of available bars in history at the current tick const int prev_calculated, // number of bars, calculated at previous tick const datetime &time[],       const...
I have been running an EA on paper trade-soemtimes, the order gets filled, but the stop loss does not,(automated NOT manual).  I have read it is a problem, and wondering if anyone has founda  script or a solution to avoid a completely automated trade (entered into and exited all by the EA)...
[Deleted]
GoodAfternoon ! Please findattached 3 ST results on the same EA, same period, same instrument, same …everything. http://prntscr.com/6uwlnd http://prntscr.com/6uwoaw http://prntscr.com/6uwr5w We cannot accept an Profit factor from 1,87 to 2,55 running the same environment... can we ? How...
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...
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