Expert Advisors and Automated Trading - page 162

To post a new topic, please log in or register
but im starting to rip my hair out. i might actually say ive tried everything - removed TP,SL, edited prices, Asks, Bids, all of it. i still get it - my fave' - error 130. could some good ol' chap point my mistake out here, please? i tried to compare it with a bunch of other lines, and codes,...
I ran a long optimization over night and when I try to run through individual results the EA does not trade and there is an "old tick" error, any ideas why and how to get around this? Seems as though the overnight option was pointless as I cannot even analyze individual results. 2015.04.24 10:14...
  iMAOnArray (1)
Could you suggest function or technique similar to iMAOnArray in MQL5?   double  iMAOnArray(    double       array[],          // array with data    int          total,            // number of elements    int          ma_period,        // MA averaging period    int          ma_shift...
Please refer to the screenshot below after back testing. 3 questions on the strange things are shown in the picture too. I read iCustom usage and check my EA and indicator again and again, finally can't find the root cause. Please help urgently and thanks a lot ! (*. You can click the...
I understand that mt5 auto downloads history data when starting a back test but I was wondering if that is the data for all time frames or just the selected time frame? Would I need to run it on all time frames if I need the data from all time frames?
I see the rent buttom  but can't buy.
On live data, the spread is about 10 points: However, one day later, when I test EA with the tick data on the same day, the spread is 20 points. Question: 1. Why history spread is twice the live spread? 2. Is there a way to set history spread? Thanks!
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 ?
I'm trying to open an order but I'm getting this warning: declaration of 'myrequest' hides global declaration How can I solve this? This is my code: MqlTradeRequest myrequest; ... void OnTick()  {... MqlTradeRequest myrequest; MqlTradeResult myresult; ZeroMemory(myrequest);...
+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)...
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...