Rank: Member
Groups: Registered, Registered Users Joined: 11/10/2008(UTC) Posts: 22
|
This is probably realy stupid, but I am baffled...
I am playing with an intraday model and cannot seem to get the Stops to work at all. I put in a brainlessly simple Buy order like: Buy at the next close, in a 5-min intraday model. It dutifully bought 5-min into the simlulation.
In simulation, I set the Stops to +4% and -4% on the "Stops" simulator page. Nothing. This hugely simple model is buying properly, but *never* stops out! In the end, it loses -49% (what a market we are in!) because it never seemed to figure out that the SL had long ago fired.
What's happening? Anyone know why I can't get a simple Stop to enact in an intraday simulation? Seems like I am missing soemthing very obvious...
Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 10/28/2004(UTC) Posts: 121
|
What type of Stop are you using (Breakeven, Max Loss, Profit, Inactivity, or Trailing)? Hate to ask...but, did you check the Longs and/or Shorts box?
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 11/10/2008(UTC) Posts: 22
|
I have an ulta-simple System Tester model, just to debug this thing:
- Stock = AAPL (just for illustration purposes)
- Intraday timeframe = 5-min, as far back as available (which happens to be 6/9/08 on eSignal)
- Buy Order = C (i.e. buy at the close of the first bar)
- Sell Order = (none; hold until it hits a Stop)
- Stops:
- Profit Goal = 4% - Max Loss = 4%
- The Longs box is checked; the Shorts box is not.
- Max simultaneous positions = 1
So I expect it to buy AAPL at the close of the first bar and simply sell it when one of the two Stops (either +4% or -4%) is triggered.
What it does instead is buy at the close of the first bar (as I expecetd), but never sells at any stop! It finally closes the position on the last bar (I have that box checked, to close on the last bar). It totally ignores the fact that AAPL has gone outside of +/-4%, and in fact ends at about -49%!
Baffled why the stops are being ignored in this ultra-simple intraday model...
Thx!
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 11/10/2008(UTC) Posts: 22
|
Does anyone have any idea why my IntraDay Stops are not working? See my post above, with ultra-simple debugging model that just refuses to fire a Stop Loss or Stop Gain, despite my entering them as parameters in the simulation...
I am still stuck here. I've tried writing an email to formula help, but no response yet. Anyone have any ideas?
Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Hi Chestnut,
My knowledge of the Advanced System Tester could be measured by the amount of fluid remaining in an upturned bottle with the cap removed, however I'm willing to test some of your thoughts and provide feedback.
Although you refer to an intra-day model in the title, I believe that the code should work for all timeframes!
After running the code, basically as posted, (on an ASX stock as I can not access AAPL) I did not get any results so set up the code below and was able to confirm the Max Loss and Profit Stops work:- Long Positions Only: Buy Order:=C>Mov(C,200,S) {Adjust the time period for testing with AAPL to get results} Limit Order:=Ref(C,-1) Sell Order: {None} Profit Stop:=LongPositions,%,4 Max StopLoss:=LongPositions,%,2 EntryDelay:=1bar {I think this is also relevant for exits}
Although I'm not sure if this is a problem and acknowledge that "Max simultaneous positions = 1" but your Buy Signal is positive on every bar.
Interested in your feedback.
oz
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 11/10/2008(UTC) Posts: 22
|
Hi Oz -
Thanks for the ideas.
Turns out I was being dumb! I had the Stops in the model, but I had negleected to check the "Long" box to activate them. So of course the simulator was ignoring them! Duh.
With that tiny fix, the model is working fine now.
Thanks again!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Funny you should say that Chestnut as I think I made the same mistake when running the initial test using your code.
I guess we refer to that as a double Duh!
Cheers,
oz
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 6/8/2010(UTC) Posts: 7
|
have you tried buy stop or stop limit in intraday time frames? i am trying to buy top in hourly , just by setting in buy order the stop at c*opt1 and it doesn't work, can you please explain if this needs some different settings than daily and in daily it works properly the same code. thanks for your time, regards
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.