Tuesday, January 06, 2009     | Register
TradersStudio Forums
Subject: Function to close all positions at last bar

You are not authorized to post a reply.   
Author Messages
tgawlik
Posts:7

09-21-2006 5:28 PM Alert 

Is anyone aware of a function to close all open positions at the last bar.  If not do you have any sample code?

 

Thanks,

 

Tom Gawlik

allenmikeg
Posts:21

07-11-2007 5:09 PM Alert 

Try this --

 

If BarNumber = LastBar - 1 Then

ExitLong("LastDay",1,ExitClose,Stop)

 

allenmikeg
Posts:21

07-11-2007 5:09 PM Alert 

Try this --

 

If BarNumber = LastBar - 1 Then

ExitLong("LastDay",1,ExitClose,Stop)

 

allenmikeg
Posts:21

07-11-2007 5:09 PM Alert 

Try this --

 

If BarNumber = LastBar - 1 Then

ExitLong("LastDay",1,ExitClose,Stop)

 

You are not authorized to post a reply.
Forums > TradersStudio 2.x > TradersStudio Basic > Function to close all positions at last bar



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