Expert Advisors and Automated Trading - page 193

Heloo. I have now look at many EA:s for when MA1 cross MA2 but I don´t understand them. How to write an EA for that strategy without anything else then this condition for buy and sell. There are so many things that I don´t need in an EA. No one has so that it can calculate how many LOT it should
I recently migrate from mql4 to mql5 .when I put a pending order with a magic number , I can modify or delete the same order by the magic number. But my problem is when the pending order opened . After it opened i couldn't access to position by the magic number I specified for pending order. I think
Hello there, I'm backtesting my EA, which is based on MA crossings and other indicators. Right now, I get blue arrows and lines when partially closing a sell position. I use ctrader. However, it's still a sell position, not a buy position. That happens just in the strategy tester visualization
What is the most effective way to have an EA catch a sudden strong momentum in one driection? I'm currently using a trading strategy where I have large trades open over a long time. Always only buy trades (to avoid swap rates). I was thinking that I could sort of "buy insurance" against a sudden
I have a working script - to a huge part thanks to the precious help I had received from this forum. The script now successfully performs the following steps: gets a filename input and reads the corresponding csv file that contains Yahoo Finance OHLCV data for a given stock, e.g. Microsoft
I purchased the <Deleted>, buyer beware my account immediately started loosing. I don't suggest this EA. They keep taking my comments off. I wonder why? ;-)
Hello all, I’m trying to write an ea where when price breaks an EMA, and comes back to touch it again, I’m placing an order to anticipate a bounce. I’ve tried this but lots of trades are missed: Buy if previous candle low > previous EMA and current close <= current EMA The first part simulates a
Does anyone know how long a demo EA signal remains active and available for subscription? It seems to me that after about 3 weeks following publishing, it is no longer possible to subscribe to demo signals, even if you have a direct link to the signal. Has anyone got more detailed information on
  how to close a position  (37   1 2 3 4)
Hello, how to close an opened position? For example, I opened a position in this manner: request.type=ORDER_TYPE_SELL;request.price=SymbolInfoDouble(Symbol(),SYMBOL_BID);   request.symbol=Symbol();request.volume=0.1;request.type_filling=ORDER_FILLING_FOK;request.sl=NormalizeDouble(stop_loss...
Hi, I don't understand why, it's been a while i'm wondering what's the problem . I have an expert advisor that works fine if I set fixed sl and tp ; I want to remove fixed tp because I want to close my position from indicator signal , so I set request.tp = 0 as mentioned in references and the error
Hey I am trying to get the history of the values when my trade was closed. I am using this to get the ticket from the history. It is sometimes correct but there are times when it gives me the wrong value. With the below function I get this: TradeOrder(ticket=113690916, time_setup=1616627110
Hi can someone help me how to insert a bitmap to my EA ? i tried the manual of MQL5 and i didnt secsussed for example i want to add the defult bitmap of dollat from folder \\Images\\dollar.bmp" to middle of the chart how can i do it
I would like to involve OnInit() in a .mqh file so that OnInit() will be executed both in the main .ex4 file and in the .mqh file. Is this possible? One must then override OnInit() in the .mqh file in some way.
Hello everyone, I'm coding my first EA and I'm trying to detect when a pending order is added or removed from the chart. I'm currently looking at the function OnTradeTransaction(), particularly at ENUM_TRADE_TRANSACTION_TYPE inside the object MqlTradeTransaction . I see there are these 2 values that
Hi, i want to test my expert advisor with optimization over all the market symbols. But when i start the test, i get the error "optimization cannot be startet". Thats all.... Am i missing something in my expert advisor? What is needed to run the optimization? Kind regards, Robert
Ok so my question is a bit nooby because i got no experience in real trading My idea is that if I receive a close signal, and send a close order, there is maybe an exception when the order isn't closed because of slippage? If so my idea was to use a buffer that I set to 1 when I want to close an
hi how can i set e expiration time for pending order ? i want to set a expiration time of 60 second from the time that the order get to the stop price and executed ( not from the time that i made the order i tried that but its retun me a error " invaild expiration " request.type_time=
Hey guys, I have a problem with my code and I am not sure how to resolve this. I want to open a single position every time a condition is met. This I have been able to accomplish. The other part is to set a trailing stop loss on this open position. Here is where the problem lies. My current code
Hello everyone, Since I am still a beginner in programming and does not know any further, I hope that this forum can help me. If my EA opens a position (long or short), then I would like to find out whether it is a long or short position. Maybe there is any function given by mql5 but i didn´t find
Hi All, I'm trying to calculate the correlation coefficient between two arrays. I basically want to replicate the Excel "CORREL" function, where I input the two arrays and the function outputs the correlation value. Does anyone have working code to do this and be willing to share it? The best I have...
[Deleted]
Dear Members is it possible to run EA on higher TimeFrame, and check ENTRY / EXIT conditions defined on a lower time frame with the use of IsNewBar on lower time frame ? Thanks SOLVED: https://www.mql5.com/en/code/768 ... I have it clarified with following article
My ea 2ma_crossover can not open any signal why (i do not know ) -- please can u help AND give this message " (( Order send function can not be called rom a custom indicator )) " any one can help please <*ex.* file deleted>
[Deleted]
Dear Forum Members Please help me to identify, where I have done wrong in the code and unable to draw trendline. BandWidth line is drawn without any problem. Thanks in advance. #property description "Bollinger BandWidth Indicator"
I bought the EA. It is doing transactions unrelated to the backtests . The scam came out and many buyers complained about it. There is even a youtube video about it is fake.I want to get a refund, can I do it
HI all, I am a newbieeee... I would like to learn how to build a robot if someone can help showing me the initial nitty-gritty of it. and i could than refine it, would someone be able to assist and help? would really appreciate it. Thanks G
I have invested my life's savings with a broker that I now suspect is a scammer. The position is in profit. My suspicion is that once I close the position I will not see my money again and they will keep all the profit and initial investment. Is there any way to log onto my MT4 account, and
Guys, I am trying to code an indicator for D1 charts, which uses M1 price/volume/spread/etc. data to calculate the indicator daily values. I use this code to copy rates: MqlRates       RatesM1[],RatesD1[];datetime       first_bar_date=SeriesInfoInteger(_Symbol,PERIOD_M1...
  EA on python  (5)
Hi I´m doing an EA on Python from 0 using the Metatrader5 Library so i can call the functions from there. Until the moment I could login with specifict username and pass and also select a symbol ("EURUSD") but I´m not being able to open a position so this makes me ask myself 2 questions. Is the
double PositionProfit = PositionGetDouble ( POSITION_PROFIT ); //is get profit What is the equivelent of POSITION_LOSS for mlq5
I need help with the optimization of my EA, I'll just go ahead and explain from the top The goal is to develop a trading system based on currency correlation. I already have the strategy part down. But the indicator itself is heavy in the sense that it goes through a lot of calculations based on 28