I have coded a strategy that has the following code in the OnBarUpdate event:
if (_triggerIdentified) { EnterShort(_numberOfContracts, shortTradeID); SetTrailStop(shortTradeID, _trailingStopAndProfitCalculationMode, _beginTrailingStopDistance, false); if (_profitTarget > 0) { SetProfitTarget(shortTradeID, _trailingStopAndProfitCalculationMode, _profitTarget); } }
_trailingStopAndProfitCalculationMode = CalculationMode.Currency;
_beginTrailingStopDistance = 500;
_profitTarget = 0;
The Short Entry happens, but a stop is never set. If however I change the CalculationMode to CalculationMode.Ticks, and change the value to 20 it works fine.
Why is it that CalculationMode.Currency doesn't work. I am assuming that when in Currency mode the value should be the dollars I want to risk loosing, is this correct?
Regards,
Scott
Comment