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?

    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?

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CortexZenUSA, Today, 12:53 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by usazencortex, Today, 12:43 AM
        0 responses
        5 views
        0 likes
        Last Post usazencortex  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        168 responses
        2,266 views
        0 likes
        Last Post sidlercom80  
        Started by Barry Milan, Yesterday, 10:35 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X