Expert Advisors and Automated Trading - page 179

  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
Hi Yesterday I tried to export data directly into a CSV file using some code for write to file etc. Just when I started the strategy tester, the computer became very noticeably slow (including the little spinning circle). It took much longer to actually display alerts in the journal and so on
As you can see from the above image i use bollinger bands , my strategy involves having 2 point of candles touching the BB band and the candles between these 2 points should form an upside down "V", i am having trouble coding the V part, i use array maximum to find the highest close between the 2
hello, I have a question: - as a signal provider, can I change the monthly subscription fee? - and if so, will this be applied to all my subcribers or only to new followers? Thanks for clearing this out for me. Mick
Hello, I am requesting a refund of my money. A week ago I bought two EAs. Merchant deleted profile and site. I do not know what to do
Basically I have been able to write the code for the candle pattern. The candle pattern is satisfied when the upper wick of 3 consecutive timeframes has the same High and Close for a bullish candle. The details of the pattern are explained in the attached images. I am trying to get all the
  Cheap VPS  (1)
Hi what is the recommend VPS to run my EA ? i have 20 customer soo i need a lot of VPS machine i need a cheap one but reliable
Dear all, I'm looking to code the following entry criteria: Define the Swing High correctly and its validity. Find the first Break High within the Swing High's validity. Confirm continuation of counting (Break High) by Break Low. If the second Break High appears plot an indicator arrow. Could you
hi i have few customer that i want to connect to my EA, i dont want to send them the ex5 file i run a vps with my EA for each customer and ask from them the password and account number and then connect them to my EA , there is a customer that dont want to send the password can i connect them to my