Created
June 17, 2016 09:42
-
-
Save marketcalls/69e467292cca91671eeab3e65cbe6cbe to your computer and use it in GitHub Desktop.
SIP - Dollar Cost Averaging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FixedDollarAmount = 5000; //SIP monthly Rs5000 | |
MonthBegin = Month() != Ref( Month(), -1 ); | |
FirstPurchase = Cum( MonthBegin ) == 1; | |
Buy = IIf( FirstPurchase, 1, // True (or 1) represents regular buy signal | |
IIf( MonthBegin, sigScaleIn, // each month increase position | |
0 ) ); // otherwise no signal | |
Sell = 0; // we do not sell | |
PositionSize = FixedDollarAmount; | |
//SetPositionSize(FixedDollarAmount,spsValue); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment