Click here to Login

                                                   Money Management - Scale-In


Matt Johnson
2020-10-05 17:38:57

Hello QS,

Would like to create a money management script that allows me to scale-in 1/10 of my portfolio at a time. For example, my trading system generates a buy signal on the daily chart and only 1/10 of the total position is purchased. If the following bar (day) the position is profitable the. The system buys another 1/10. This would continue each bar until either 10/10 of the shares have been accumulated or the system generates a sell order. So far I have been able to do this with 1/2 (e.g. buy half at first buy signal and then the other half the next bar if position is profitable. Just not seeing how to do this in smaller fractions over a longer period of time.
Thank you in advance for any help on this!

Best Wishes,


2020-10-06 07:49:53



If you were able to do it with 1/2, I am not sure why you can't with 1/10.

You can for example, use the "OnNewPosition" event and update the number of shares. And on the "OnEndPeriod", you can buy additional 1/10 every bar. You can create global variables to keep track of the different states (for example, the shares accumulated...)

No more messages


No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"


Trading Items
Long strategy created with the money management tool
Withdraw a Fixed Amount Every Month - Money Management
Correlation Filter Money Management Strategy
Investing in stocks using the Kelly criterion money management st...
Return per Bar Stop - Money Management Strategy

How-to Lessons
How to calculate the average of a time series using the money man...
How to debug a trading system using the money management tool
How to dynamically change the number of positions in a portfolio?
How to generate buy/sell signals from a trading system
How to add custom position-based metrics to your trading system

Related Forum Threads
Backtesting: Using lookback money management feature
Place a profit stop through Money management strategy
Hedging Money Management
Ability to edit multiple money management scripts at once
Can a Money Management script access a custom function?

Blog Posts
Basic trading system implemented using the money management tool
Money Management: Optimize the scale-in strategy
Money Management: Scale-in Trading Strategy
Create a trading strategy using the money management tool - Part ...
Create a trading strategy using the money management tool - Part ...

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2023
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Follow us on Google+
RSS Trading Items

Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.