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.

Marc33139

Members
  • Content Count

    5
  • Joined

  • Last visited

Everything posted by Marc33139

  1. Thanks so much for the code.
  2. I'm tying to code a strategy for trading the YM as follows: Enter market short when price closes +40 pts above yesterdays close and time is 2am or later. Exit when either price retraces to yesterday's close, or the time is 9:45am. Reverse for long entry with price -40 pts. I believe it should be quite simple to code, but can't seem to get it. Below is what I came up with. Any assistance would be greatly appreciated. Thanks. inputs: Offset(40), Stop_Loss(500), Exit_Time(945), Start_Time(200); Value1 = CloseD(1); if time >= Start_Time and time <= Exit_Time then begin if marketposition = 0 and close > Value1 + Offset points then sell short next bar at market; if marketposition = 0 and close < Value1 - Offset points then buy next bar at market; end; If time >= Exit_Time and MarketPosition <> 0 then begin Sell all contracts next bar at market; BuyToCover all contracts next bar at market; end; if marketposition = 1 and close <= Value1 then sell all contracts next bar at market; if marketposition = -1 and close >= Value1 then buy to cover all contracts next bar at market; setstoploss(Stop_Loss);
  3. I was a member of his forum since it first opened, until very recently. The reason I terminated my membership was that several of my responses to posted questions in the forum were being deleted by him. I had pointed out various discrepancies in his nightly videos, together with information regarding IBOG and how turning it off was more accurate but didn't produce nice looking equity curves. On several occasions I also mentioned the slippage and commission being omitted too. I believe I contribute much to users of that forum, yet it appears HE is interested only in selling system. He would not allow my comments to be visible. Marc
  4. Thanks for your reply. Much appreciated.
  5. I'm trying to add a daily stop loss or daily profit target to the canned systems in TS 8.3, on an intraday basis. Once this $$$ has been met, I'd like the system to stop trading for that day. Additionally, I'd like the option of having the daily stop loss and daily profit target to be located in the inputs section, so I can optimize them. I've tried using the SetStopLoss and SetProfitTarget, but they continue to trade again after they have been triggered. They don't stop for the rest of the day. There is code in the TS forums, but it is several years old and I can't get it to work. I'm not sure if it is because the coding has been updated and its no longer compatible. Any help would be greatly appreciate.
×
×
  • Create New...

Important Information

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