• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order quantity based on risk

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Order quantity based on risk

    Not really a technical question, just hoping someone can help me figure out the math here, it's got me utterly confused...

    What I'm trying to do is have my strategy define order size (forex) based on a risk in USD. Let's say the ammount I'm willing to risk on any trade is USD$100.

    Risk would be the stoploss amount; let's say I'm using ATR*2.

    -What would be the formula for currency pairs involving USD (EURUSD/USDJPY...)?

    -What would be the formula for pairs not involving USD (Say EURJPY)? I assume I will need to use the EUR/USD exchange rate, or the USD/JPY exchange rate, or both?

    Any help would be appreciated!

    #2
    Hello Marktheshark,

    Thank you for your note.

    If your risk is your Entry minus your stop, times your trade size,

    Code:
    (Entry-Stop)*TradeSize=Risk
    Then, if my math is correct,

    Code:
    TradeSize = Risk / (Entry-Stop)
    An example,

    You buy EUR/USD at 1.1700, the ATR is at 1.1600 and you wish to risk $100.

    Code:
    TradeSize = $100 / (1.1700-1.1600)
    You would then trade a size of 10,000.

    I highly suggest doing your own research into whether this is correct.

    Regarding the EUR/JPY ratio, I would suggest searching the net for Cross Currency trades along with how to calculate the stop point.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your help - I figured it out.

      I realise this is basic stuff but in case anyone is interested, this is what I did:

      double PipValueUSD = (1/ExchangeRate);
      double StopLossValueUSD = 2*ATR1[1]*PipValueUSD;
      double OrderSize_double = 100/StopLossValueUSD;
      int OrderSize = (int)OrderSize_double;
      ExchangeRate is a configurable parameter in my strategy. The value should be the exchange rate of the USD to the second currency in the pair. For trading EURAUD, use the USDAUD value (1.4). For EURJPY use 111. For pairs with USD as second currency, enter 1.

      The "100" is the risk in USD I'm willing to take on the trade.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by akuntysh, Today, 12:02 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by hir04068, Today, 04:26 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by Revan, Yesterday, 11:53 PM
      4 responses
      25 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by Vincere, Today, 03:32 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by Thomas79, Today, 03:22 AM
      0 responses
      4 views
      0 likes
      Last Post Thomas79  
      Working...
      X