boulbi
07-03-2009, 01:28 PM
// Condition set 1
if (orderId.Length == 0 && atmStrategyId.Length == 0 && CrossAbove(Close[1]etc.))
{
atmStrategyId = GetAtmStrategyUniqueId();
orderId = GetAtmStrategyUniqueId();
AtmStrategyCreate(Action.Buy, OrderType.Limit, 0, 0, TimeInForce.Day, orderId, "MY-ATM", atmStrategyId);
}
So i have a stop on my Dom with that code.
But if i want to put another priority condition > to my stop loss generated on the Dom to close my strategy, do i have to put :
// Condition set 2
if (Close[1] < MyIndicator(...))
{
AtmStrategyClose("idValue");
Is that right, or i need to add another code ?
thanks
if (orderId.Length == 0 && atmStrategyId.Length == 0 && CrossAbove(Close[1]etc.))
{
atmStrategyId = GetAtmStrategyUniqueId();
orderId = GetAtmStrategyUniqueId();
AtmStrategyCreate(Action.Buy, OrderType.Limit, 0, 0, TimeInForce.Day, orderId, "MY-ATM", atmStrategyId);
}
So i have a stop on my Dom with that code.
But if i want to put another priority condition > to my stop loss generated on the Dom to close my strategy, do i have to put :
// Condition set 2
if (Close[1] < MyIndicator(...))
{
AtmStrategyClose("idValue");
Is that right, or i need to add another code ?
thanks