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 elderan, Today, 08:03 PM
        0 responses
        2 views
        0 likes
        Last Post elderan
        by elderan
         
        Started by algospoke, Today, 06:40 PM
        0 responses
        10 views
        0 likes
        Last Post algospoke  
        Started by maybeimnotrader, Today, 05:46 PM
        0 responses
        9 views
        0 likes
        Last Post maybeimnotrader  
        Started by quantismo, Today, 05:13 PM
        0 responses
        7 views
        0 likes
        Last Post quantismo  
        Started by AttiM, 02-14-2024, 05:20 PM
        8 responses
        169 views
        0 likes
        Last Post jeronymite  
        Working...
        X