Code: getting current exchange rate in testing mode

Back to topics list To post a new topic, please log in or register
Smeagol 2015.10.16 19:52

I'm backtesting my EA and in my EA I am trying to get the current exchange rate using the SymbolInfoTick() function, but this function is not allowed in testing mode.

I couldn't find any threads on this forum about it (the search sucks), so any idea how I can convert to and from base currency? (for the purposes of calculating trade volumes)



WHRoeder 2015.10.17 02:12 #
  1. You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
  2. Account Balance * percent = RISK = (OrderOpenPrice - OrderStopLoss)*DIR * OrderLots * DeltaPerlot (Note OOP-OSL includes the SPREAD)
  3. Do NOT use TickValue by itself - DeltaPerlot
  4. You must normalize lots properly and check against min and max.
  5. You must also check FreeMargin to avoid stop out

Smeagol 2015.10.17 12:53 #

Thanks, I'll try and research those functions you mention, and see if I can rewrite my stop loss calculation. (whats DIR?)

If I am trading on several different symbols (forex, metals, bonds, etc) I'd need to have different calculations right based on base currencies and appropriate normalisation?

Back to topics list  

To add comments, please log in or register