In State.Configure:
SetProfitTarget(@"Long Entry 1",CalculationMode.Ticks,5)
SetStopLoss( @"Long Entry 1", CalculationMode.Ticks, 5, false)
SetProfitTarget(@"Long Entry 2",CalculationMode.Ticks, 10)
SetStopLoss( @"Long Entry 2", CalculationMode.Ticks, 10, false)
In OnBarUpdate
EnterLong(2, "Long Entry 1")
EnterLong(1, "Long Entry 2")
In OBU how can I select which Long Entry I want to manage (adjust Stops and Targets)? Something like:
if(signalName == "Long Entry 1")
{
do something
}
else if (signalName == "Long Entry 2")
{
do something else
}
I have tried a few things with no joy like:
if(EnterLong.Name.Contains("Long Entry 1")) but EnterLong is a method so this does not work.
Thanks.
Comment