Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

cortlane

Members
  • Content Count

    1
  • Joined

  • Last visited

Personal Information

  • First Name
    TradersLaboratory.com
  • Last Name
    User
  • City
    Anytown
  • Country
    United States
  • Gender
    Male

Trading Information

  • Vendor
    No
  1. I have a TS automated strategy (ES Futures) and would like to have a capability to turn off the automation and stop trading for the day once a certain PROFIT (in dollars) or LOSS is reached during the day. I found some code in the TS forums that was suppose to accomplish this but it does not seem to work. Any help/suggestions would be appreciated. The TS forum code is: Variables: NP( 0 ), OPP( 0 ), PLB4Today( 0 ), ProfToday( 0 ), PTarget( 2000 ), LLimit( -660 ) ; NP = NetProfit ; OPP = OpenPositionProfit ; If date <> date[1] then PLB4Today = NP[1] + OPP[1] ; ProfToday = NP + OPP - PLB4Today ; If ProfToday >= PTarget or ProfToday <= LLimit then begin { exit all trades } Sell this bar close ; Buy to cover this bar close ; end else begin //Insert the trading code here
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.