Hi,
I'm new to this and I'm stuck. My code does not seem to execute at all. Here my very simple code :
Are there any incoming ticks?
Show your complete code and use the code button (Alt+S) when pasting code.
I'm in mql5/mt5. It is in the Experts/Advisors folder in meta editor and in the Expert Advisors/Advisors folder in MetaTrader.
My complete code is:
//+------------------------------------------------------------------+ //| AutoTP.mq5 | //| Copyright 2022 | //| | //+------------------------------------------------------------------+ #property copyright "Copyright 2022" #property link "" #property version "1.00" //--- input parameters input int TakeProfit=10; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) {} //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- Print("OnTick"); } //+------------------------------------------------------------------+
Is your MetaTrader 5 connected to the broker account?
On what symbol chart are you attaching the EA and is the chart updating quote prices?
Please provide some screenshots.
I'm on EUR/USD 1M chart, the EA name is written in the top right so it's active. The chart is updating, I can place trades and all, so the account is connected.
Please note that the Market for EUR/USD is currently closed for the weekend. So, the chart cannot be updating (at least not now).
Either test on a different symbol that has activity during the weekend, or wait for Monday to continue testing.
When that happens please provide a full screenshot that includes the Chart, the Market Window and Journal log that shows something like this ...
2022.11.26 21:01:54.903 Experts expert AutoTP (EURUSD,M1) loaded successfully
And then a second screenshot of the Experts log.
Please note that the Market for EUR/USD is currently closed for the weekend. So, the chart cannot be updating (at least not now).
Either test on a different symbol that has activity during the weekend, or wait for Monday to continue testing.
When that happens please provide a full screenshot that includes the Chart, the Market Window and Journal log that shows something like this ...
And then a second screenshot of the Experts log.
- 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 new to this and I'm stuck. My code does not seem to execute at all. Here my very simple code :
void OnTick()
{
//---
Print("OnTick");
}