Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Profit target works for long but not short

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

    Profit target works for long but not short

    Code:
                {
                EnterLongLimit(DefaultQuantity, Close[0], "");
                SetProfitTarget("", CalculationMode.Ticks, ((High[1]-Low[1])*100)/2);
                SetStopLoss("", CalculationMode.Ticks, ((High[1]-Low[1])*100)*1.5, false);
                }
    this works fine for long

    but if i inverse the above to:

    Code:
                {
                EnterShortLimit(DefaultQuantity, Close[0], "");
                SetProfitTarget("", CalculationMode.Ticks, ((High[1]-Low[1])*100)/2);
                SetStopLoss("", CalculationMode.Ticks, ((High[1]-Low[1])*100)*1.5, false);
                }

    the profit target does not get set but stoploss does.

    #2
    Hello calhawk01,

    If you place TraceOrders = true inside of your Initialize() do you get any messages in your Output Window regarding the Profit Target Order?

    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sidlercom80, 10-28-2023, 08:49 AM
    168 responses
    2,262 views
    0 likes
    Last Post sidlercom80  
    Started by Barry Milan, Yesterday, 10:35 PM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by WeyldFalcon, 12-10-2020, 06:48 PM
    14 responses
    1,429 views
    0 likes
    Last Post Handclap0241  
    Started by DJ888, 04-16-2024, 06:09 PM
    2 responses
    9 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    41 views
    0 likes
    Last Post jeronymite  
    Working...
    X