Expert Advisors and Automated Trading - page 66

Greets, This has been working for a while now, but today I noticed it's not working as expected. Not sure what's changed (maybe nothing has changed and this has never worked). I basically want to trigger some code when a deal is in profit/loss. It works when the deal is in loss (ie, hits the SL)
Hello All My modify TP/SL code below won't modify sell positions instead I get modify errors. With Buy positions everything modifies as normal, please assist me as to why sell positions will not modify. #include <Trade\Trade.mqh> #include <Trade\SymbolInfo.mqh> #include <Trade\PositionInfo.mqh>
Hello, I want find minium SL of Positions sell. I have code: But return a value is SL of Last Position. Help me. double SLSell(string type, int magicNumber) { double MinSLSell = 0; for(int i= PositionsTotal() - 1; i >= 0 ; i--) { if(PositionSelectByTicket(PositionGetTicket(i))) { string _symbol =
Hi, I have taken one EA and the coder has sent me the Ex5 file to test on meta qoutes 5 demo server. I tested it for 1 week and it has shown some losses for the week in 1 symbol trade. However, I did the backtesting for the same period and back testing shown me some possitive result with the same
Hi all, I have been trying to use Webrequest in getting community sentiment into my EA. But I keep getting the above error 'WebRequest' - no one of the overloads can be applied to the function call Any help to fix this will be greatly appreciated. Below is the section of my code that needs to be
Hi master MQL coders, I have been trying my hand on using Telegram to get updates about my expert advisors. Lately I created a Telegram channel where I want to send entries taken by an expert advisor. However, I encounter error 1007. This is the first time I encountered this error, and I could not
Hi, I don't find examples in the Documentation (probably looking wrongly), how do I extract I single value from a matrix ? this doesn't seem to work static vector x_norm(SAMPLE_SIZE); static matrix input_data[ 1 ][SAMPLE_SIZE][ 1 ]; for ( int i = 0 ; i < SAMPLE_SIZE; i++) { x_norm[i]
Good afternoon, community members. I am developing an EA that exclusively trades the EURUSD pair. The strategy involves opening a new position to average the price whenever the price moves against the current position. This part is working perfectly. However, I am facing difficulties with the
I have roboforex account, can you explain how I can copy my account at IC markets, and what about spread, on IC markets I have better spread, do both trades close at the same time? I use MT4
//+------------------------------------------------------------------+ //| ma.mq5 | //| aniruddha | //| https://www.mql5.com |
I had a broker and account in MQL5. It wasn't an issue to transfer money in but when I tried transferring money out from MQL5 back to Coinbase. My wallet was totally wiped out. I traced the transaction hash and can see another wallet other than mine that it was transferred to. How can I file report
Hello! I like to change the lot size of the following MT5 EA ExpertMAMA-mq5. Does anyone have a idea how i can adjust the lot size? Many thanks for your support! Kind regards, Frank //+------------------------------------------------------------------+ //|
Hi all, My funtion: double ProfitCheck(long const magic_number){ double profit=0.0; HistorySelect(0, TimeCurrent()); int trades_total = HistoryDealsTotal();&nbsp;&nbsp; for(int i=0; i &lt; trades_total; i++)&nbsp;&nbsp;&nbsp;&nbsp; { long ticket = HistoryDealGetTicket(i); long...
I have created a custom symbol using CustomSymbolCreate(). The sole purpose of this symbol is to create a chart that will be used for displaying data, so I am not interested in any tick data. When I run my EA, I switch to the new symbol using... ChartSetSymbolPeriod ( 0 , "MySymbol" , PERIOD_M1); My
I have 8 Core with 32GB RAM, still get this error. 2024.07.26 18:10:35.495 Core 1 not enough available memory, 11500 Mb used, 16322 Mb available, maximal available block is 16322 Mb How can I handle this? Thanks and regards
Hello fellow traders, I'm running optimizations on an EA I'm currently developing and when I backtest on a 4 years period from 2020.01.01 to 2024.01.01, this is the results I get: And when I backtested it on a 3 years period from 2021.01.01 to 2024.01.01 here are the results I get: I don't
Hi, I have a MQL VPS bought recently. I am using an EA which requires an indicator. When I setup the chart and try to upload it says, 2024.07.25 14:06:44.504 Terminal ' ': 0 charts, 0 EAs, 0 custom indicators, signal disabled, last known ping to Access Server - Singapore is 2.35 This indicator
Hi guys, i have this code: bool PriceMovedFar() { double distance = 0.0; double pipValue = SymbolInfoDouble(_Symbol, SYMBOL_POINT); distance = (price2 - price1) / pipValue; return distanceInPips > 50 ; } if i use this code in usdjpy, that function return true as soon as the price moves higher
Hi I like to copy my trades from an account to other. But I already use an EA with specific HotKeys. Is there a technical solution to copy the trade between accounts to this situation
Hello, Can I use the zero value of a magic number in a EA to control the manual trades I opened? thanks GL
i have an EA that continuously loose money what should i do to inverse it effect
Hello All, I'm sure the answer is buried deep within this forum and I have attempted to look just didn't find anything I might be able to use. Well any ways. Here is what I am trying to do. Basically once an order is closed I want the take profit booleans to be set back to false that way the current
Hi, I'm traying to add ONNX models without using resource (because I want to add them to the parameters input). Is there any way around to make this possible
Hello, i have problem with my ea. I have more order limit at level price. But EA creat many order with duplication price. I want count order price at level. And I will filter order duplication. How to fix? int OpenSellOrders( double Level) { int sellorders= 0 ; int selllimit= 0 ;
Hello, i have a very simple strategy based on 3 indicators that i would like to turn into an EA for better Backtesting and trading if it turns out to be profitable. My problem is that i cant code at all so im looking for someone who maybe would code this for me. I think it would not take too long to
Good evening, I am trying to create my own expert advisor for the U.S. indices, I have implemented various controls and they seem to work well, such as whether a symbol is valid, whether the market is closed or open, the program shows me the moving averages and RSI correctly but when it tries to
I am trying to get a total count of buy (open buy + buylimit + buystop) and sell (open sell + selllimit + sellstop) orders at a particular price level. The following function code seems to get the count correctly in some instances but shows a zero count in other cases. I am not able to figure out...
Hi friends Please I have an indicator which have 3 buffers. The 3rd buffer should return EMPTY_VALUE for buy condition OR same value as second Buffer in sell condition. But in strategy tester, the indicator constantly returns thesame value for first and second buffers. Please help me take a look
Why is it i failed the validation for OrderSend due to invalid trade volume but i am able to send orders in the strategy tester
hello every one I failed to write code that enables me to close all opening orders and pending after achieving a specific profit on a specific symbol and need to make that profit as a variable