• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalculationMode.Percent

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

    CalculationMode.Percent

    Hi,
    In my strategy while
    SetProfitTarget(CalculationMode.Ticks, TakeProfitValue);
    SetStopLoss(CalculationMode.Ticks, StopLossValue);
    work fine, CalculationMode.Percent does not work
    SetProfitTarget(CalculationMode.Percent, TakeProfitValue);
    SetStopLoss(CalculationMode.Percent, StopLossValue);
    No exits are happening with CalculationMode.Percent.

    Regards

    Vivek

    #2
    Hello AnkaS,

    Thank you for your post.

    What value are you setting StopLossValue to when using Percent as the CalculationMode?

    If you look to the Orders tab of the Control Center (if testing realtime) or the Strategy Analyzer (if backtesting) do you see the Stop Loss but at a price you would not expect - such as too far away?
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Hi,
      Calculations as follows which matches the numbers in the orders tab of Performance Window
      Entry Price 2132.25
      SL% 0.01
      TP % 0.05
      SL Price 2110.9275
      TP Price 2238.8625

      Appears that the input TakeProfitValue to SetProfitTarget(CalculationMode.Ticks, TakeProfitValue), needs to be a fractional value, instead of % which should be divided by 100.

      Regards

      Vivek

      Comment


        #4
        Hello AnkaS,

        Thank you for your response.

        Is price hitting the Stop Loss level but not filling? Can you provide the script used and any details on the instrument and settings used to test?
        Patrick H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by marianfed, Today, 09:47 PM
        0 responses
        1 view
        0 likes
        Last Post marianfed  
        Started by hir04068, Today, 09:29 PM
        0 responses
        1 view
        0 likes
        Last Post hir04068  
        Started by iq200, 03-11-2018, 07:49 PM
        24 responses
        1,008 views
        0 likes
        Last Post mrlucky1x  
        Started by DavidHP, Today, 08:18 PM
        0 responses
        1 view
        0 likes
        Last Post DavidHP
        by DavidHP
         
        Started by liquid150, Today, 06:20 AM
        1 response
        10 views
        0 likes
        Last Post User1104  
        Working...
        X