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.

fulcanelli

Members
  • Content Count

    2
  • Joined

  • Last visited

Personal Information

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

Trading Information

  • Vendor
    No
  1. 1. output your values to a temporary debug file so you can see what is going on (PTS set to 0.03 doesn't seem valid for ES). 2. track if a trade has been entered today by watching MarketPosition. 3. Exit near the end of the day 4. Buy my trading software that autogenerates EasyLanguage (when I release it someday). Input: TimeCalc (1000), Length(9), PTS(5); Var: bool HaveTradedToday(false); if CurrentBar = 1 then FileDelete( "c:\debug.txt" ); If Time = Timecalc then begin Value1 = Highest(high,length); Value2 = Lowest(Low,Length); HaveTradedToday = false; End; If Time > Timecalc and HaveTradedToday = false then begin FileAppend( "c:\debug.txt", NumToStr(PTS,2) + "," + NumToStr(Value1,2) + "," + NumToStr(Value2,2) + "," + NumToStr( Value1+PTS, 2 ) + "," + NumToStr(Value2-PTS, 2 ) + NewLine ); Buy("le") next bar at Value1 + PTS points stop; SellShort("se") next bar at Value2 - PTS points stop; End; if MarketPosition <> 0 then HaveTradedToday = true; if ( Time > 1230 ) then begin Sell("lx-eod") next bar at market; BuyToCover("sx-eod") next bar at market; end;
  2. Yes, you can easily write EasyLanguage to save any TS data to a text file that can then be read by a C++ program. Additionally, an EasyLanguage strategy can load a DLL written in C++ and the C++ can use COM to access EasyLanguage variables in real-time. I found info on how to do this in the TS forums a year or two ago and it worked for me.
×
×
  • Create New...

Important Information

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