Wrong deviation and required change

shows the Example orders for a deal for a short and a long bot.

For the short deal I would have expected to see positive Price deviations and negative Required price to close deal in % and the other way round for the long deal.

Price deviation = order price - start price.
Required price to close deal = (breakeven - order price) / order price

It is always negative for short and postive for long.

Please, check this.

Price deviation, % = 
  (   Order price
    / start price
    - 1
  ) * 100

Required change to break-even, % =
  (   Average price
    / Order price 
    - 1
  ) * 100

Required change to take profit, % =
  (   Take profit price
    / Order price
    - 1
  ) * 100

Examples:

Long

  • Start: 100
  • Current: 75
  • Average: 78
  • Take profit: 80.4
DV:    (75   / 100 - 1) * 100 = -25
RC BE: (78   /  75 - 1) * 100 =  4
RC TP: (80.4 /  75 - 1) * 100 =  7.2

Short

  • Start: 100
  • Current: 125
  • Average: 120
  • Take profit: 116
DV:    (125 / 100 - 1) * 100 =  25
RC BE: (120 / 125 - 1) * 100 = -4
RC TP: (116 / 125 - 1) * 100 = -7.2

Another example