Expert Advisors and Automated Trading - page 123

Hello every one.... Something weird happened in my expert advisor. It perfectly works fine on XAUUSD but when I change it to another symbol it just stops opening positions, i've just written _Symbol for any required places but I don't know why it only works on gold... anyone happens to have
Hi, Is there a way to code to buy or sell only when it touches the value while coming from top to bottom? I mean, the condition for buy is when RSI value touches 30 and for sell, when RSI value touches 70. But I don't want the trade to happen when RSI moves from 35 to 30 instead i want the trade to
Hi everyone, I have a basic EA which I am using for backtesting indicators (or systems of indicators) for their effectiveness. I have run into an issue where the same indicator with exactly the same settings (input parameters) is giving me different results. A) When I backtest the EA with the
If the stochastic risk line crosses 20 up, buy. If it cuts 80 down, sell. How can I write these codes
Hi Expert, MQL5 reference has a standard library and contain a trade class, one of them is ctrade. However, Under same MQL5 reference, there are trade functions also. I found both can perform trade operation, but when programming, what is the difference, and which one is better? Can share your
This is the code: trade.Sell(fixed_lot,act_symbol,info.Bid(), 0 , 0 , "Sell" ) I don't have any problem usually, but sometimes, in the strategy tester this error appear. 2022.10.08 17:39:52.144 2022.09.05 01:36:00 requote 0.99053 / 0.99055 / 0.99053 (instant sell 0.1 EURUSD.Renko.ATR8.0 at
Hi Everyone, I am trying to run my expert on 4 currencies pairs during backtesting to check for margin calls etc. Unfortunately, one of the two following things keep happening during every backtest; 1) the expert does not trade on all forex pairs, infact it only trades on one, or 2) if it does trade
Hello Friends I am searching for Last day Daily data Open,High,Low,Close for Analyze data for swing high and swing low and for next day, weekly, monthly target projection. I am looking for download all major pair daily data in one click in dailydata.xls or csv file. Can some one help me to code it
Hello am wring this as an enquiry and as a trader its all about the mt5 backtester i need someone with vast knowledge and experience to provide advice about the mt5 tester as of now it seems like mt5 backtester is not a reality or perhaps our method of backtesting is bad,,,,, could someone
I copied a EA mql5 code from the internet, in the development environment it does not show any error, but when I run it it does not perform operations, Although others have this EA working correctly. The EA has this line #include <Trade/Trade.mqh> Do you think this line is the cause of the problem
The MetaTrader for Python documentation shows users can only use the history_orders_get and history_deals_get functions to access historical trade data, rather than a simple history_positions_get function. On MT5, trades are split into 5 elements; Position 'In' Order 'In' Deal 'Out' Order
#include <Trade/Trade.mqh> int handle; datetime lastSignal; CTrade trade; int OnInit() { string name = "test1\\Schaff Trend Cycle.ex5"; handle = iCustom(_Symbol, PERIOD_CURRENT, name ); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert
Hello, I can't understand how to close an open buy with a ORDER_TYPE_CLOSE_BY. my code : for ( int i= 0 ; i<tcount; i++) { if ( PositionSelectByTicket (ticket_chain[i]) && PositionGetInteger ( POSITION_TYPE ) == POSITION_TYPE_BUY ) { long stoplevel =
I did a search before creating this topic and the thread I found only explained how to hide an EA source code by converting it to an ex5 file. However, I have tried during this for my script but it doesn't work. Does this mean that scripts must be shared or am I missing something? I attached a
  EA not taking operations  (12   1 2)
I have windows 11 pro 64 I tried several EA it is opining but not working as sell or buy. the test is not working probably
[Deleted]
Hi there, Is there any variant for this to get only todays orders ? HistorySelect(TimeCurrent(),TimeCurrent()); << does not work (looking for something like this) HistorySelect(0,TimeCurrent()); << gets all orders Thank you MRC
My first bot to ever record profit is showing huge loss amounts. How can I circumvent this by reducing the cost of the loss? I have modified Stop Loss all over the place and still get the same results. I am using H8 BTCUSD. I have also tried the Intraday filter to try prevent trades on Thursday as
  NormalizeDouble rounding ?  (11   1 2)
Why ? void OnStart () { double x = 9906.8 / 100000 ; printf ( "x = %s" , DoubleToString (x)); printf ( "ND(x) = %g" , NormalizeDouble (x, 2 )); } returns : 2022.10 . 05 13 : 07 : 07.736 ND (EURUSD,H1) x = 0.09 906800 2022.10 . 05 13 : 07 : 07.736 ND (EURUSD,H1) ND(x) = 0.1 I've asked 2
Hello , can someone can help me how to disable the algo trading button when launching the robot in the OnInit() function thanks
Hello, I’m looking for pointers on how to code for the 3hr Bollinger bands. The 1hr, 4hr and daily bollinger bands are built in but not the 3hr
I am trying to implement a function in a EA, after price moves 100 pips in your favor, Move SL to 10 pips after Entry poinT, so stop loss can stay in profit and also use tralling stop to stay in profit. Somebody have an idea of how to implement it
  Changes to EA  (8)
Hi All, Can any of you fine colleagues advise whether it is possible to execute take profit on the machine/platform, rather than sending it to the Broker as a request with the order? I'm getting hypertrading alerts from my broker and hoping that by removing the TP request from the order I will
Happy Weekend I am trying to use "switch-case" operator and have following issue. I have defined timeFrames locally as ENUM_TIMEFRAMES. If I pass in this variable case mTFH01 , I get error 'mTFH01' - constant expression required and if I pass in case PERIOD_H1 , I get inconsistent results e.g
  OnTick  (4)
Hello friends. How do we ensure that an operation is performed only once in the OnTick function
Hello, Below is the money management part of my expert. The calculation based on the "percent of equity" still returns a volume at 0.01. Where is the bug ? Thanking you in davance for your help ! double MoneyManagement() { double lot = 0 ; double Free = AccountInfoDouble ( ACCOUNT_EQUITY );
Dear Members I have created a nested for loop shown in below in code section. I want to exit (break) when variable idxFB = j is found. Currently it do break of inner loop on satisfying the condition but then goes to first outer loop and loop again for inner loop. seeking advise from experts here
How this code would be for MT5?double totalBuyLots = 0;      double totalSellLots = 0;            for(int i=0; i < OrdersTotal(); i++)      {                 if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == true)         {            // match the symbol EUR/USD or EUR/CHF,...
  detaching charts  (3)
Hey guys in MT4 I used to have a very helpful script where it would detach my charts so I could use them on my multiple screens. is there anything like that for MT5? thank you
Hello everyone 🥳 I’ve got some EA that work good for me, but I want to add more setting to this EA so I talk with the owner of this EA and he doesn’t want to sell/give me the source code of this EA. Basically what I want is to add option for profit target and when it’s reach this target the
Good evening, First of all, thank you for taking your time on this topic. I have problems with this code. The EA is programmed to insert stoploss automatically once a trade is opened in the same exchange (both automatic and manual). With some brokers I have no problem while with others it returns