Strategy tester initial amount

 

Hi guys,

how to set initial balance and currency for the strategy tester
I cannot find the setting for that.

Thanks

 

CTRL+C this text.

[Tester]
Deposit=12345
Currency=TRY

Select this tab.



After CTRL+V.

 
fxsaber #:

CTRL+C this text.

Select this tab.



After CTRL+V.

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.


 
Marco Montemari #:

For the indicator it seems not way to set it.

#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
 
fxsaber #:


Thanks a lot!!!

 
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