Hi!
I'm currently trying to stich my first EA together and was finally able to compile without any errors. When running the backtest, I can see all the data/indicators I wanted to include showing up properly, but no trades are being executed, even though all conditions are met. I suppose the EA is not able to properly send a trade, here's the snippet where I suspect something odd:
I tried to change all my input variables, but no matter if testing live onr on historical data, the EA just won't trade...would really appreciate if anyone with experience can look over what I posted above!
Thanks a lot!
Hi!
I'm currently trying to stich my first EA together and was finally able to compile without any errors. When running the backtest, I can see all the data/indicators I wanted to include showing up properly, but no trades are being executed, even though all conditions are met. I suppose the EA is not able to properly send a trade, here's the snippet where I suspect something odd:
I tried to change all my input variables, but no matter if testing live onr on historical data, the EA just won't trade...would really appreciate if anyone with experience can look over what I posted above!
Thanks a lot!
You can see the relevant error code on the "Experts" tab of the "Toolbox" ... and then search the given code in the documentation.
Hi!
I'm currently trying to stich my first EA together and was finally able to compile without any errors. When running the backtest, I can see all the data/indicators I wanted to include showing up properly, but no trades are being executed, even though all conditions are met. I suppose the EA is not able to properly send a trade, here's the snippet where I suspect something odd:
I tried to change all my input variables, but no matter if testing live onr on historical data, the EA just won't trade...would really appreciate if anyone with experience can look over what I posted above!
Thanks a lot!
Show a screenshot of the error that appears after compilation at here.
I'm still trying to figure it out, currently reading through some more tutorials to get a better understanding on what I'm actually doing, heh...
There is no error message, the EA compiles with 0 errors, can be loaded into the backtester and a live chart, everything shows up as supposed, but it just doesn't trade, that's why I suspect that my code section for sending trades posted above is faulty...
I'm still trying to figure it out, currently reading through some more tutorials to get a better understanding on what I'm actually doing, heh...
There is no error message, the EA compiles with 0 errors, can be loaded into the backtester and a live chart, everything shows up as supposed, but it just doesn't trade, that's why I suspect that my code section for sending trades posted above is faulty...
I understand you dont get any errors when compiling, but do you get any errors in your logs when backtesting? Backtest and then click "Journal", see if there is any failed trades.
Hi!
I'm currently trying to stich my first EA together and was finally able to compile without any errors. When running the backtest, I can see all the data/indicators I wanted to include showing up properly, but no trades are being executed, even though all conditions are met. I suppose the EA is not able to properly send a trade, here's the snippet where I suspect something odd:
I tried to change all my input variables, but no matter if testing live onr on historical data, the EA just won't trade...would really appreciate if anyone with experience can look over what I posted above!
Thanks a lot!
By trade class they mean
#include <Trade/Trade.mqh> //...Global variable CTrade trade; void OnTick() { if (PositionsTotal()==0) //Condition so that only one trade is opened at once {trade.Buy(0.10,NULL); //This opens a buy position } }
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi!
I'm currently trying to stich my first EA together and was finally able to compile without any errors. When running the backtest, I can see all the data/indicators I wanted to include showing up properly, but no trades are being executed, even though all conditions are met. I suppose the EA is not able to properly send a trade, here's the snippet where I suspect something odd:
I tried to change all my input variables, but no matter if testing live onr on historical data, the EA just won't trade...would really appreciate if anyone with experience can look over what I posted above!
Thanks a lot!