Hello,
I'm new to AFL coding. I have designed a system that I wish to backtest. Everything works fine but I'm stuck at one simple point. I wish to keep #of shares constant & not to increase with increase in my capital.
For example, I wish to trade in 2 lots of Nifty. than how do I let system understand this. I tried coding this but than sometimes it takes only one lot. I really could not understand such a behaviour or AmiBroker. Can anybody help?
Code is as below
LotSize = 50;
SetOption("MinShares",LotSize);
PositionSize = C*50*2;
Please advice.
I'm new to AFL coding. I have designed a system that I wish to backtest. Everything works fine but I'm stuck at one simple point. I wish to keep #of shares constant & not to increase with increase in my capital.
For example, I wish to trade in 2 lots of Nifty. than how do I let system understand this. I tried coding this but than sometimes it takes only one lot. I really could not understand such a behaviour or AmiBroker. Can anybody help?
Code is as below
LotSize = 50;
SetOption("MinShares",LotSize);
PositionSize = C*50*2;
Please advice.