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 lightsun47, Today, 03:51 PM
    0 responses
    2 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    8 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    41 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    13 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    8 views
    0 likes
    Last Post port119
    by port119
     
    Working...
    X