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.

vanyok

Members
  • Content Count

    6
  • Joined

  • Last visited

Personal Information

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

Trading Information

  • Vendor
    No
  1. Figured it out... actually it was something silly... My code is correct.. it's just EasyLanguage ignores variable changes from within the code. It look at variables from Strategy Format window. I have to remember to adjust Input entries from there, not from within the code.
  2. Alright.. I got this so for but it doesn't seem to work for some reason. Any tips ? Ideas ? Thanks in advance... Inputs: DayMaxProf(100), DayMaxLost(20); Variables: NProf(0), OProf(0), PLToday(0), PLB4Today(0), MP(0), TargetHit(FALSE); MP = MARKETPOSITION; NProf = NETPROFIT; OProf = OPENPOSITIONPROFIT; If DATE <> DATE[1] THEN BEGIN TargetHit = FALSE; PLB4Today = NProf[1] + OProf[1]; END; PLToday = NProf + OProf - PLB4Today; IF PLToday>=DayMaxProf OR PLToday<=NEG(DayMaxLost) THEN TargetHit = TRUE; IF TargetHit=FALSE THEN BEGIN .. . . .Strategy goes here . . END; :crap:
  3. Hey guys, I have another Easy Language question if you don't mind. Still learning... :crap: How can I get my P/L for the day ? I want to set a daily goal / daily loss and want the strategy to no longer place any trades once the goal/loss is hit. I found the "NETPROFIT" reserved word but that returns total net profit, doesn't seem to reset at the end of the day. Any idea ? Thanks in advance.
  4. So to make my order last 5 bars I have to have 5 separate conditions ? Kinda sucks but I guess it makes sense. Thanks guys.
  5. Hello everyone. I'm new to the forum. Nice little community you guys have here Can someone help me out with this problem? I can't figure out how to extend the order to more than one candle...Is it possible ? By default Strategy orders look something like: IF blah then BUY THIS CANDLE MARKET; or IF blah then BUY 1 CONTRACT AT blah NEXT BAR LIMIT IF that next candle doesn''t meet my criteria the order gets canceled. I would like my order to look something like this instead: IF "blah" then BUY 1 CONTRACT AT blah NEXT 3 BAR LIMIT So basically I would like my limit order to stay active for next 3 bars ( or whatever amount of bars I specify) unless filled. Is it possible ? How can I achieve this? THank you. :pc guru:
  6. First post! Did you ever get this to work ? You're forgetting one important statement. I believe the order system is configured for equities by default. you have to specify that you're trading contracts... From the EasyLanguage manual: So your could would need to be something like: Inputs: StopAmt(1), ProfitAmt(1); SetStopContract; SetStopLoss(StopAmt); SetProfitTarget(ProfitAmt);
×
×
  • Create New...

Important Information

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