Tuesday, January 06, 2009     | Register
TradersStudio Forums
Subject: How to increase the size of a trade

You are not authorized to post a reply.   
Author Messages
thimel1
Posts:14

12-03-2007 2:02 PM Alert 

I'm trying to create a system where I buy an equity at some time and then on a later bar I want to buy more shares.  I have tried using a second Buy command both with the same SignalName and a different SignalName than the original Buy.  In neither case does the buy happen. 

Is there some way to do this?  If all else fails, I guess I can exitLong and then Buy a larger value at the same time, but this will incur extra simulated commissions.

Thanks

murray
Posts:435

12-03-2007 3:28 PM Alert 

TradesAllowed

Another set of constants relating to Buy/Sell is the values allowed for the built-in flag calledTradesAllowed.  In TradersStudio Versions 1.0 and 1.1, adding on to a position was not permitted.  If you were short, you could not enter another sell order to increase your short position.  This built-in flag can have three values:

 

NoSameDirection  (default) - same as used in TradersStudio 1.0 and 1.1;
AllOrders This constant allows you to add to positions each time any Buy or Sell order is placed.  For example, if a market has a channel breakout and sets a new 20-day high three days in a row.  In this case, you will be long three contracts.
SameDirectDiffSignals This constant allows you to add positions in the same direction, but only if signal names are different.

 

 

ExitsAllowed

 

ExitsAllowed is a built-in flag that controls behavior of ExitLong and ExitShort functions.  It can be one of the following:

 

NoSameDirection (default) Allows you to exit from an entry unlimited number of times.  For example, if entry size was 10, then you can have 10 exits, each exit having size = 1.
SameDirectDiffSignals Allows you to exit only once.  For example, if entry size was 10, then you can exit from the position only once.  If you want to exit more than once, then you have to pass different exit names to ExitShort or ExitLong function.

 

 

You are not authorized to post a reply.
Forums > TradersStudio 2.x > TradersStudio Basic > How to increase the size of a trade



ActiveForums 3.6
TradersStudio® Copyright 2004-2009 All Rights Reserved   |  Privacy Statement  |  Terms Of Use