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 -

    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    147 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    4 views
    0 likes
    Last Post tkaboris  
    Started by GussJ, 03-04-2020, 03:11 PM
    16 responses
    3,282 views
    0 likes
    Last Post Leafcutter  
    Working...
    X