Tuesday, January 06, 2009     | Register
TradersStudio Forums
Subject: Multiple Entries

You are not authorized to post a reply.   
Author Messages
Charles_Gaudet
Posts:5

10-04-2007 2:04 PM Alert 

Hello -

How do you allow the Session to Buy multiple entries on different days?

For example, I could place an entry on Day 1 if the order condition was met and on Day N so long as it met the order conditions - up to a total of 4 positions and only 1 position per day.

Thank you.

Charlie

murray
Posts:435

10-04-2007 3:29 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.

 

 

Charles_Gaudet
Posts:5

10-04-2007 3:38 PM Alert 
thank you! i've searched in help and within the manual and am unable to locate an example of how this is used ...

can you provide me with an example of how & where I would add the "AllOrders" to my code?

thank you.
murray
Posts:435

10-05-2007 1:06 PM Alert 

TradesAllowed=AllOrders

Add this line to your code.

 

You are not authorized to post a reply.



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