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 TraderG23, 12-08-2023, 07:56 AM
        9 responses
        382 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        1 view
        0 likes
        Last Post oviejo
        by oviejo
         
        Started by pechtri, 06-22-2023, 02:31 AM
        10 responses
        125 views
        0 likes
        Last Post Leeroy_Jenkins  
        Started by judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Yesterday, 06:52 PM
        4 responses
        36 views
        0 likes
        Last Post ScottWalsh  
        Working...
        X