Traders Laboratory - View Single Post - Start and End Timing?
View Single Post
  #1 (permalink)  
Old 06-20-2007, 10:05 AM
jmi88 jmi88 is offline
jmi88 has no status.

 
Join Date: Oct 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
This member is the original thread starter. Start and End Timing?

Im trying to test a system and have it start trading at 8:00am and close any postion at end of day...For example this simple MA cross, how would I put in 'dont take a signal till after 8am' and then 'exit any postion at the close'?

Thanks for any help

inputs: Price( Close ), FastLength( 9 ), SlowLength( 18 ) ; variables: FastAvg( 0 ), SlowAvg( 0 ) ; FastAvg = AverageFC( Price, FastLength ) ; SlowAvg = AverageFC( Price, SlowLength ) ; if CurrentBar > 1 and FastAvg crosses over SlowAvg then Buy ( "MA2CrossLE" ) next bar at market ; if CurrentBar > 1 and FastAvg crosses under SlowAvg then Sell Short ( "MA2CrossSE" ) next bar at market ;

Reply With Quote