Expert Advisors and Automated Trading - page 31

To post a new topic, please log in or register
Hi there, I am new to MT5 and learning write some simple expert advisor by silghtly modify stock signals. below is my test EA source code. what i am expecting is when MACD main line above zero level && STOCH main line > STOCH signal line. it should generate a buy signal. MACD singal pattern value is
Since the EA i'm writing will be used only on forex pairs, should I check the SymbolInfoInteger(SYMBOL_TRADE_CALC_MODE) ? 1. is this SymbolInfoInteger(SYMBOL_TRADE_CALC_MODE), a reliable checkup to be sure if EA is activated on a forex pair (and not on OIL and other stuff) ? and I have added the...
  vps trouble (18   1 2)
Hi guys I have a ea that I want to run on a vps but I am having difficulty setting up the vps. I went trough all the steps to migrate and to synchronize the vps with my mt4 account but it does not seem to be working. The EA works when my pc is on it enters and exits trades but not when I turn the pc...
Good morning, I had a strange behaviorusing the CopyRates function in MQL5. I tried to load some Rates using the CopyRatesfunction for a specified Symbol (CustomSymbol). The requested data is on aPERIOD_M1 and represents two months of rates starting from the SERIES_TERMINAL_FIRSTDATE of the Symbol....
I've written an EA (with help of existing code I have found on the forum and the net) that reads in information from the experts log file. However, I need the information in real time, and the log file is only updated in intervals throughout the day I think, when the terminal is closed, or when you...
Hello. Can Anybody help me? I found the following code that works on MT4 to toggle AutoTrading button: #include <WinUser32.mqh>#import "user32.dll"int GetAncestor(int,int);#define MT4_WMCMD_EXPERTS  33020#importvoid OnTick()  {   int main=GetAncestor(WindowHandle(Symbol(),Period()),2/GA_ROOT/);...
If you have a $10,000 balance 1:100 demo account with a risk percentage input in you EA, and if you input say 10% then is the trade size $1000 when your first trade is found or is the 1:100 leverage automatically applied so the trade size becomes 100,000 (1lot)? Any info helps thanks
Good morning, I'm trying to learn the MQL4 language. I downloaded the MT4 platform. I downloaded all the data (F2). I created a program and did the tests. I tried to search for operations on MT5 and the values (RSI, MA, BID etc etc) do not always coincide. So if I change platforms or brokers the
I am trying to follow the code this person is providing in his example (Code pasted below) #include<Trade\Trade.mqh> Ctrade trade;input int SmallMovingAverage=20;input int BigMovingAverage=50; void OnTick() { // Calculate Ask price double
Hello friends, I'm writing an EA but I'm having trouble with the programming logic part. The EA should do the following: At each candle check if the fast moving average of 05 has crossed from low to high the slow ones of 75 and 85, if it has, check if MacD has changed from negative to positive for
Hello, Is there any function in Expert Advisor that the signal is received only when each candle starts? (i.e. I am looking for a function to control that each signal works every 30 minute when each candle (30M) starts? Best, S. Green
i cann't use more local computer to optimize my EA, but system‘s macd can be used....why?help! thank you
Hi everyone Does anybody know of any EAs what use hurst cycle analysis? Or even a system based on FLDs? It's something that interests me but I dont have the slightest idea of coding
Hi guys, I hace several questions about OnDeinit function When close MT5 does this function works? I mean, I use 100 charts, each one with the same indicator. If I create a function that deletes all indicators of all those 100 charts into OnInit, It will work? My problem is that I use the same 3
Can you see what is wrong here? I get some operator is needed when calling this function. I want to scan orders on other currency pairs on other charts and see what type the other orders are, and set it to a number of 1 if it is active. So I call it two times one for buy and one for sell. But it is
  Day Counter (6)
Merry Christmas everyone! I have been trying to figure out how to code when a day has passed, add one to the candle counter then determine if trading is allowed for that day. Any help will be greatly appreciated. A comment function for the day counter may also be helpful
Hi. I coded an expert to calculate the new lot size after every position. Problem is, the calculated lot is not used in the immediate next trade. It comes second. Can anyone help me find a better way of doing it? Seems I have been using a wrong approach, for way too long. I can't think no more. D(
Hello Community, Is there a way to view and track your P/L for each EA that I am running? I am currently running 3 EA's on 6 currency pairs on one account (so 18 charts in total). Even though the net result is that I am making steady gains I need to know which EA is the most profitable. In other
Hi, I have an error when I compile the follwing code; //+------------------------------------------------------------------+//| ProjectName |//| Copyright 2018, CompanyName |//|
I'm trying to test my code but I keep getting the below errors/messages which prevents me from buying or selling. Thoughts? 2017.05.08 08:46:29.749    2017.04.02 21:08:59   current account state: Balance: 10000.00, Credit: 0.00, Commission: 0.00, Accumulated: 0.00, Assets: 0.00, Liabilities: 0.00,...
Dear sir and madam, it is no item of "Register a Virtual Server" to provided in MT5,how can i solve the problem? But when I use MT4,This item can be shown and chosen
The problem closes immediately as soon as this position is opened. normally did not close. for the last week. What do you think is the reason
  Signals are not copying (14   1 2)
Hello I bought signal from provider 2 weeks ago and see that owner is still trading but unfortunatelly nothing is trading on my account. I wrote message to the author but he not responded. I have VPS and also money on account. What could be wrong
MT5 has a built-in expert "ExpertMAMA". I've been running tests on it this week and so far, it's performing decently. However, i cannot run it on MT4. MT4 has a simple MA advisor, but its parameters are different from ExpertMAMA. I need help if somebody knows or can point out to me what is the
  Error 130 (15   1 2)
Hello my friends. I have an EA that work correctly. I tested it on Alpari broker But this ea on forex-time broker some times have error 130 on order send. BUT i know about minimum tp or sl distance. see this: I trade EURUSD on this price 1.11600 and I got this 2020.01.15 20:33:22.696 '47443724'
  Restart VPS (10)
Why yesterday at 02.00 was my VPS reset, deleting EA that was running?! I lost a lot of money, how i can contact support
Hi, I am building a simple EA to place an order based on MA. (i.e. when a bid price is above MA then to place a buy order....). I want to place only one order placement for each candle. Do you know how to control for this? Best, Mygreen
Hello, everyone, I started learning how to program in MQL5 today and I'm trying to make a simple moving average cross expert advisor. It compiles without errors, but when I try to test it in the strategy tester it does not seem to work, it stays still. I'm not sure if the problem is in the code or
HI Sir, I rented hosting for 1 month to my <Deleted> account. I added one pair till now. From yesterday I added another pair but it is not working. only 1 pair is working.. I read that I can use upto 16 pairs once i rented. So what should I do now.. Please solve my problem
  Update or delete line (12   1 2)
Hi I have an indicator that draws a line at candle open of 1h timeframe. Then I switch to 5min timeframe. When 1h candle is closed and price moves, the line that has been drawn previously is not deleted and a new one is drawn (still in 5 min tf). How can I delete it and recreate it? or rather update