1. How would you do this in code? Is it something like TickSize = ?; Maybe TickSize = 0.00005 (for half a pip)? Would this go under Initialize() or OnStartUp()?
2. Also, would it be possible to check the instrument being run against (so if it's USDJPY it would only be 0.005)? I'm not sure how you'd check the instrument.
This is so I can set stop loss and take profit levels based off of ticks and have it not be dependent on what the user has set as an option in their own instance (would of course give very different results!).
3. Would this override carry over into backtesting, regardless of what the user has selected in the GUI? (especially for use in Slippage field which takes a tick value)
4. Not related to TickSize, but for SetStopLoss and SetProfitTarget - if you put them under OnBarUpdate(), can you check if position is long or short and assign different parameters to them? That is, can you do something like the following:
if (Position.MarketPosition == MarketPosition.Short)
{
SetStopLoss( .... );
SetProfitTarget(...);
}
if(Position.MarketPosition == MarketPosition.Long)
{
SetStopLoss(....);
SetProfitTarget(....);
}
Or does it make more sense to do something like
SetStopLoss("Long1", ...);
SetStopLoss("Short1", ...);
Just thought of this one... would these 2 kind of be equivalent (assuming only one trade active) ?
Thanks again guys.

Comment