change amount of contracts
- This topic has 6 replies, 2 voices, and was last updated 8 years ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
Similar topics:
Forums › ProRealTime English forum › ProOrder support › change amount of contracts
Tagged: money management, position size
Hi all,
Just a short question. In my prorealtime strategy, I have committed the line below for buying a contract.
BUY 1 CONTRACT AT MARKET
Before starting the strategy in proOrder, the system asks how many contracts you want to trade. I placed the following number ‘4’. But because of the code it still keeps on buying 1 contract instead of 4. What do I have to change in the code to get the number of contracts that are put in when you start the strategy in ProOrder (4 contracts in this case).
Thanks again.
Gr. Pieter
Hi Pjotterd.
There was an excellent post about money management but I can repeat it here. It will take into consideration how much your code earned, and place x amount of contract for you vs. your risk. It will accumulate your contract when you win and vice versa.
//REM Money Management
Capital = 1000
Risk = 0.01
StopLoss = 10 // Could be our variable X
// Calculate contracts
equity = Capital + StrategyProfit
maxrisk = round(equity*Risk)
PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)
BUY PositionSize CONTRACT AT MARKET
when the system ask how many contract you want to trade when preparing is the max contract you want to use.
Br. Elsborgtrading
yes.
//REM Money Management
Capital = 1000
Risk = 0.01
StopLoss = 10 // Could be our variable X
// Calculate contracts
equity = Capital + StrategyProfit
maxrisk = round(equity*Risk)
PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)
if PositionSize <=4 then
PositionSize =4
endif
BUY PositionSize CONTRACT AT MARKET
or.. raise the Risk = 0.01 to something higher, and look in the backtest result window under “orderlist” to see if you got the right number you want.
when you proved your code to be profitable it is still highly recommended to use the Money Management code. Just because it awesome and it actually managed your account so you don’t loose all your money in one deal. Trading is all about money management!
Find exclusive trading pro-tools on