Strategy on Daily, not getting stopped out where it should

Questions about MultiCharts and user contributed studies.
rkhan
Posts: 65
Joined: 16 Mar 2014
Has thanked: 1 time
Been thanked: 2 times

Strategy on Daily, not getting stopped out where it should

Postby rkhan » 18 Jun 2014

I have a strategy running on the daily bars of ES
I have a set the stoploss to be 1 bigpoint, as shown below (so $50).

setstopcontract;
SetStopLoss(bigpointvalue);

Now when i run my strategy and view the results, i see many trades are stopped out correctly, and there are also many winning trades.

So then i go and i look at the winning trades, and i look at the intraday data.
And i see that the intraday data actually went past the stop point, so should have been stopped out, but yet it was not stopped out, and shows as a winning trade.

So this is very very scary, because it make me loose a little faith in MC.
But before that i would like to investigate, what could be causing this.

What could cause the intraday chart to hit a stop level, yet the strategy does not stop it self out.
Is this possibly because
- I am running the strategy on a daily chart?
- because the stop isn't being hit during the NYSE hrs or something?

or what else could cause this?

rkhan
Posts: 65
Joined: 16 Mar 2014
Has thanked: 1 time
Been thanked: 2 times

Re: Strategy on Daily, not getting stopped out where it shou

Postby rkhan » 18 Jun 2014

Just adding to my previous post.
I found that i get different results on a DAILY charts when i change the session time from 24/7 to be only 9:30 - 16:15

What does the session time do?
Because the bars are still the same OHLC, yes the trades results are definitely different.

Does it only OPEN positions within session times, yet close them anytime?
Or does it open/close only within session times?
or what?

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Strategy on Daily, not getting stopped out where it shou

Postby TJ » 18 Jun 2014

Can't do the diagnostics with only this snippet, there are too many variable at play here... you need to provide more detail. Things don't just happen for no reasons.

Code: Select all

setstopcontract;
SetStopLoss(bigpointvalue);

rkhan
Posts: 65
Joined: 16 Mar 2014
Has thanked: 1 time
Been thanked: 2 times

Re: Strategy on Daily, not getting stopped out where it shou

Postby rkhan » 18 Jun 2014

Here is the full code below

As you can see, there is no real complexity about it.
I simply buy at a stop level the next day, and then put a stop

Many of the stops get hit, but allot of them don't get hit as well
When i say they dont get hit, i mean, the price actually moves to the stop level, and yet MC does not exit the trade for some unknown reason

So when i look at winning trades, they should actually be loosing trades.

I think this is something to do with either
- Session template (because when i change this to 24/7 vs 9:30 - 16:15 i get dramatically different results.
- Or, Bar magnifier, maybe this needs to be turned on EVERYTIME you use this type of stop, because when i turn that on or off, i again get dramatically different results.

My guess is maybe it doesnt exit outside the session template or something?

Code: Select all

if EntriesToday(date) = 0 then begin
buy("PattBuy") tomorrow at stb stop;
end;

if openpositionprofit > iMinOpenProfit then begin
sell("LongLiq") tomorrow at market;
end;


setstopcontract;
SetStopLoss(bigpointvalue);

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: Strategy on Daily, not getting stopped out where it shou

Postby ABC » 19 Jun 2014

rkhan,

without the Bar Magnifier the strategy will only use Open, High, Low and Close of the bar and Multicharts won't know how the price moved from Open to Close. That's why you are seeing situations where the intraday data would have stopped the trade, but in your test this didn't happen.

Regards,
ABC

rkhan
Posts: 65
Joined: 16 Mar 2014
Has thanked: 1 time
Been thanked: 2 times

Re: Strategy on Daily, not getting stopped out where it shou

Postby rkhan » 19 Jun 2014

Dear Sir,

Yes that makes sense but, why is It that when I change the session time to be 9:30am to 16:15
And I enable bar magnification using 5min chart

Then why is it that I still find winning trades which should have been stopped out but where not?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Strategy on Daily, not getting stopped out where it shou

Postby Henry MultiСharts » 12 Aug 2014

rkhan, which data provider do you use?
Please study the following article: How Signals are Calculated


Return to “MultiCharts”