Register Login
Forums    February 9, 2012
TradersStudio Forums
How to increase the size of a trade
Last Post 12-03-2007 03:28 PM by mur ang. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Tom Himel
New Member
New Member
Posts:14

--
12-03-2007 02:02 PM

    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

    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    12-03-2007 03:28 PM

    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.


     TradersStudio, Inc. ® Copyright 2004-2012 All Rights Reserved   Terms Of Use  Privacy Statement