NexusFi: Find Your Edge


Home Menu

 





NinjaScript risk % of account equity per trade


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one stearno with 1 posts (0 thanks)
    2. looks_two GgMc with 1 posts (0 thanks)
    3. looks_3 zickzack with 1 posts (0 thanks)
    4. looks_4 rleplae with 1 posts (1 thanks)
    1. trending_up 2,586 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
GgMc
Philly
 
Posts: 1 since Aug 2014
Thanks Given: 0
Thanks Received: 0

Heya guys,

I've been trying to figure out a method of risking at most 2% of my total account equity per trade. I've been playing around with some strategies and I wanted to figure out if anyone has come up with a ninja script to set the amount risked equal to a % of their account based on their stoploss.

For example, I have a strategy where the stoploss works best at 20 pips and an account with net equity 10,000 USD, I want to limit those 20 pips of EUR/USD to being 2% of my total account or 200$. How that looks to me is:

What risk of 10,000$ is 20 pips = 200$ on EUR/USD?
What about 10,000$ and 40 pips = 200$ on EUR/USD?
Or if 25,000$ account and 20 pips = 500$ on EUR/USD

I greatly appreciate any help with this.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Five Days Until the Gap Dies -- CME Goes 24/7 on All Dig …
Traders Hideout
OneChronos Launches First Combinatorial Auction FX Venue …
Currencies
Kharg Island at 6%, Regime Fall at 1.5% -- The Black Swa …
Prediction Markets & Event Contracts
Hormuz Normalization Collapses to 19.5% -- Iran Regime F …
Prediction Markets & Event Contracts
Kalshi Sets $4.13B All-Time Weekly Record as Polymarket …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 zickzack 
Switzerland
 
Experience: Intermediate
Platform: NinjaTrader
Posts: 7 since Jun 2010
Thanks Given: 12
Thanks Received: 0

I've never found something like that. It would be the only thing I would like to have mechanical/automated in my trading. Calculating the position size based on my stop and % I like to risk. But there are some indicators that help to determine the position size and risk like this one: https://nexusfi.com/download/ninjatrader-7/indicators/1166-download.html?view

Unfortunately I don't if you find some non-elite-member indicators out there.


Reply With Quote
  #3 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,860


What about this :

amount = capital * max risk percentage / (pipvalue * number of pips SL)

your example :
suppose you have 1000 € and want to risk 2%
maximum loss = 20 €

equivalent lot = 1000 € * 0,02 / (0,0001 X 20)

0,02 : 2 %
0,0001 : pip value
20 : number of pips

result being 10000 €
you can maximum buy/sell 10000 € with a 20 pip stop

check : 20 pips of 10.000 € = 10.000 * 0,0020 = 20 €

be careful, you can have slippage on your stop.

I normally trade futures, and there we talk ticks and contracts.


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on August 27, 2014


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts