Register Login
Forums    February 9, 2012
TradersStudio Forums
Function to close all positions at last bar
Last Post 07-11-2007 05:09 PM by Mike Allen. 3 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Thomas Gawlik
New Member
New Member
Posts:7

--
09-21-2006 05:28 PM

    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

    Mike Allen
    New Member
    New Member
    Posts:21

    --
    07-11-2007 05:09 PM

    Try this --

     

    If BarNumber = LastBar - 1 Then

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

     

    Mike Allen
    New Member
    New Member
    Posts:21

    --
    07-11-2007 05:09 PM

    Try this --

     

    If BarNumber = LastBar - 1 Then

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

     

    Mike Allen
    New Member
    New Member
    Posts:21

    --
    07-11-2007 05:09 PM

    Try this --

     

    If BarNumber = LastBar - 1 Then

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

     

    You are not authorized to post a reply.


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