So, let me see if I have this correct?
Let's say I have a trade plan subroutine called
PerMarginPlanWithTaxes(Percent, Ceiling) ' this is one of the built in ones
And I have a trading "system" called
RsiSystem(various parameters) ' this is my system where I determine the entry and exit points and execute Buy() and Sells().
Now, TradersStudio executes both of these subroutines one bar at a time (presumably the RsiSystem() first, followed by the PerMarginPlanWithTaxes() routine?).
RsiSystem() is executing Buy() this, Sell() that, ExitLong(), ExitShort(), etc. for whenever it is appropriate. Now, let's say that RsiSystem() executes a Buy("LONG", LotSize, 0, CloseEntry, Day), and say LotSize = 5 and ContractLotSize = 100 which would then result in a buy of 5 x 100 = 500 shares.
Now, the system calls PerMarginPlanWithTaxes() for the same bar, and PerMarginSystemWithTaxes() can override the buy of 500 shares by setting the units to 0, effectively cancelling the trade? Is that correct?
Now further, let's say that a trade plan calls for no more than 5% of equity to be used for any one trade in a $100,000 account. That should limit the trade size to $5,000 correct? Now, suppose everytime the RsiSystem() called buy for a trade, it was coded to buy 1,000 shares * a price of $8, resulting in a request to buy $8000 worth of stock. Would the trade plan then simply reject every trade since it exceeded the $5000 equity limit and no trades would execute?
What I am getting at is that allowing a trade or not (setting the units to 0 or not) seems like a very limiting way to be able to control the size of a trade. Am I missing something and there is a way to set finer granular control over the size of each trade?
Sorry, for the long question, but it is important that I understand how this works.
By the way, except for a few fairly minor bugs, TS 2.5 is working fine on Vista. I have been writing code and testing it for a couple of weeks. If you will let me know where to send the bug reports, I will send them to you.
Thanks,
Jay Bailey
|