Okay so I have to multiply this value 0.2 by the lot size. However I'm trying to make something that would work with all instruments. Not necessarily risking $200 USD, but risking $200 of the base currency.
There's no variable in ninjatrader where I could get the lot size, so I guess this has to be hardcoded for every instrument?
Last edited by little leo; April 4th, 2016 at 06:50 AM.
My objective is to have a similar if not equal amount of money at risk with every single trade (say 200$). Stop Loss and Take Profit are known before entering a trade.
I'm trading indices such as GER30, US30, JPN225, NAS100, HKG33, EUSTX50 and SPX500 which come in different currencies. The problem is that an equal range trading the HKG33_CFDHKD or the JPN225_CFDJPY yields less US$ per pip than when trading the GER30_CFDEUR.
As far as i'm aware of, the differences are a) the ranges itself (i.e. Entry - TP/SL) b) yield per pip and c) the exchange rate from the index currency (e.g. JPY) to the account currency (USD).
In order to have an equal constant amount at risk with each trade I'd like to dynamically adjust the quantity of CFDs traded.
My approach was to divide the amount at risk by the range traded.
Range = 10050 - 10000 = 50pip
Risk amount = 200 $
Yield per pip (FXCM) = 0.1