#property strict #property indicator_chart_window #property indicator_buffers 0 #property indicator_plots indicator_buffers int OnInit() { Print(AccountInfoDouble(ACCOUNT_BALANCE)); Print(AccountInfoString(ACCOUNT_CURRENCY)); return(INIT_FAILED); } int OnCalculate(const int rates_total, const int prev_calculated, const datetime& time[], const double& open[], const double& high[], const double& low[], const double& close[], const long& tick_volume[], const long& volume[], const int& spread[]) { return(rates_total); }
2023.01.01 00:00:00 12345.0 2023.01.01 00:00:00 TRY Test (EURUSD,M15) OnInit return code is INIT_FAILED
Marco Montemari #: Thanks for your reply but I have just recognized my request is incomplete. I want to set the currency type for testing an indicator, not an EA. For the indicator it seems not way to set it
An Indicator can't trade, and can't affect the balance or equity. In other words, back-testing an Indicator in the Strategy Tester, that monitors Balance or Equity will not function as expected.
Fernando Carreiro #:
An Indicator can't trade, and can't affect the balance or equity. In other words, back-testing an Indicator in the Strategy Tester, that monitors Balance or Equity will not function as expected.
I wanted to set the balance and the currency in the strategy manager for testing an indicator, not setting them using the indicator neither trading.
I solved the issue thanks to @fxsaber
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi guys,
how to set initial balance and currency for the strategy tester?
I cannot find the setting for that.
Thanks