I would like to buy monthly a certain amount for example 100$, unfortunally if the close is 10000.
Amibroker is not buying. How can I change the formula to buy 100/10000 close=0.01 shares.
Is there any other solution to buy in fraction or divide the close/100 if I get …
If I have bought more than 10000$ I would reduce the size 50% after 10% profit.
FixedDollarAmount = 100; MonthBegin = Month() != Ref( Month(), -1 ); FirstPurchase = Cum( MonthBegin ) == 1; Buy = IIf( MonthBegin, sigScaleIn, 0 ); // each month increase position Sell = 0; // we do not sell PositionSize = FixedDollarAmount;