Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM strategy requires Stop Loss setting ?!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ATM strategy requires Stop Loss setting ?!

    My strategy has good entries but poor on Exiting. so I code it once the position become profitable, hand it to my custom ATM strategy so I can manually manage the Exit on the other window with Chart Trader. The problem is the ATM strategy treat this external order as entry order and requires Stop Loss setting, but in my case, I use for Exit only. Then I try to leave the Stop Loss price far away, but it keeps coming up after my Exit is hit. is there anyway to disable Stop Loss.

    and here is the ATM portion in my strategy:
    if (orderId.Length == 0 && atmStrategyId.Length == 0 && Position.GetProfitLoss(Close[0], PerformanceUnit.Points)> 1.25)
    {
    atmStrategyId = GetAtmStrategyUniqueId();
    orderId = GetAtmStrategyUniqueId();

    if(Position.MarketPosition==MarketPosition.Short)
    AtmStrategyCreate(Cbi.OrderAction.BuyToCover, OrderType.Limit, Low[
    0]-2, 0, TimeInForce.Day, orderId, "AtmStrategyExitOnly", atmStrategyId);

    elseif(Position.MarketPosition==MarketPosition.Long)
    AtmStrategyCreate(Cbi.OrderAction.Sell, OrderType.Limit, High[
    0]+2, 0, TimeInForce.Day, orderId, "AtmStrategyExitOnly", atmStrategyId);

    }

    #2
    Hello solvmatic, unfortunately a stop value has to be set for an ATM strategy template. You could also not disable it via code, it would be cancelled once the other part of the ATM, your target is filled, or the ATM would be closed via -

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    71 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    39 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X