English

## riskmoney of a position not having stoploss?

 165 joshatt 2014.10.08 02:22    Hi all,I'm working on a code that calculates "total riskmoney" (if all StopLoss hit......) of the current chart.  I found that with those orders/positions that I did not set stoploss, they're given a very large stoploss. My plan is to deal with them with a stoploss of any of my other orders/positions which already has a stoploss. What should I do?
 Moderator3489 GumRai 2014.10.08 03:30 #   calculate  OrderStopLoss()-OrderOpenPrice()  as multiples of ticksize  using MarketInfo   Then find tickvaluemultiply these 2 and *OrderLots()  togetherEDIT:This answers the question that you first posted, not your edited and completely changed post
 165 joshatt 2014.10.08 03:46 #   GumRai: calculate  OrderStopLoss()-OrderOpenPrice()  as multiples of ticksize  using MarketInfo   Then find tickvaluemultiply these 2 and *OrderLots()  togetherEDIT:This answers the question that you first posted, not your edited and completely changed post Thank you, sir. I find how to do that searching forum:  `sum += ( OrderOpenPrice()-OrderStopLoss() )*(MarketInfo(Symbol(), MODE_TICKVALUE)/MarketInfo(Symbol(), MODE_TICKSIZE))*OrderLots();`But I don't want to just ask for deleting this thread, so I changed the subject before anybody reply. ^_^
13112
WHRoeder 2014.10.08 15:51 #

 joshatt: I found that with those orders/positions that I did not set stoploss, What should I do? Those have infinite risk (compared to you account balance) Those will be closed by the dealer once you've lost half of your money (stop out/margin call.) Fix your code.
165
joshatt 2014.10.12 10:51 #

WHRoeder:
 joshatt: I found that with those orders/positions that I did not set stoploss, What should I do? Those have infinite risk (compared to you account balance) Those will be closed by the dealer once you've lost half of your money (stop out/margin call.) Fix your code.
Thanks.