Order of signals within the backtesting

Questions about MultiCharts and user contributed studies.
turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Order of signals within the backtesting

Postby turbofib » 11 Apr 2018

The system that is applied to the chart is a trendfollowing type that breaks the previous bar
(stop 1 tick .... profit 2 tick)

Referring to the link

https://www.multicharts.com/trading-sof ... ssumptions


the candle in question has:

Open: 2723.5
High: 2726.5
Low: 2722.25
Close: 2726

According to the rules of the link above we are in the case of Assumption 3

Open <(Low + (high-low) / 2) ===> 2723.5 <(2722.5+ (2726.5-2722.25) / 2)

So we are in Assumption 3

In the bar a short (2723) is performed, a short covering (cover 2723.5)
and finally a new long position (2726.25) ..

The long position remains in progress and is not closed in the day ...

But according to the rules of assumption3 it should be stopped (LOW = 2722.25) instead it is overtaken ..


Why? what rules are there for managing different intrabar signals?
Attachments
Immagine.png
(28.27 KiB) Downloaded 823 times

Zheka
Posts: 225
Joined: 13 Jan 2016
Has thanked: 8 times
Been thanked: 53 times

Re: Order of signals within the backtesting

Postby Zheka » 11 Apr 2018

With such a tight stop-loss/profit target, you would definitely want to use Bar Magnifier.

https://www.multicharts.com/trading-sof ... _Magnifier.

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Order of signals within the backtesting

Postby turbofib » 11 Apr 2018

hi,
i read your link but i want simulate backtesting not live trading


i think that THE SIGNAL IN GRAPHIC IS OBTAINED FROM NORMAL BACKTESTING WITHOUT USING THE BAR MAGNIFICER ...
WHAT I ASK IS :
HOW THE BACKTESTING ALGORITHM ORDER THE LOGIC SEQUENCE ?
I see
https://www.multicharts.com/trading-sof ... ssumptions

If there is this link it means that the backtesting single made closed candle and not intrabar
it say:

While it is not possible from these four values to infer the actual price movement within each bar, the Backtesting Engine improves the backtesting accuracy by incorporating intra-bar price movement assumption logic:

An order could be executed at every valid price level throughout the entire range of the bar.
If the opening price is closer to the high of the bar than to the low, the intra-bar price movement is assumed to be in the order of Open-High-Low-Close.
If the opening price is closer to the low of the bar than to the high, or if the opening price is exactly in between the high and the low of the bar, the intra-bar price movement is assumed to be in the order of Open-Low-High-Close.

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: Order of signals within the backtesting

Postby wilkinsw » 12 Apr 2018

The system that is applied to the chart is a trendfollowing type that breaks the previous bar
(stop 1 tick .... profit 2 tick)

Referring to the link

https://www.multicharts.com/trading-sof ... ssumptions


the candle in question has:

Open: 2723.5
High: 2726.5
Low: 2722.25
Close: 2726

According to the rules of the link above we are in the case of Assumption 3

Open <(Low + (high-low) / 2) ===> 2723.5 <(2722.5+ (2726.5-2722.25) / 2)

So we are in Assumption 3

In the bar a short (2723) is performed, a short covering (cover 2723.5)
and finally a new long position (2726.25) ..

The long position remains in progress and is not closed in the day ...

But according to the rules of assumption3 it should be stopped (LOW = 2722.25) instead it is overtaken ..


Why? what rules are there for managing different intrabar signals?
Taking a quick look...it looks correct to me. Without bar magnifier MC is assuming that this candle opened, moved to its low, then to its high, then closed. Why? Because it is a green candle where c>o.

Again, just taking a glance, your short was stopped two ticks higher (ie a 2 tick stop). Your long would've been stopped out too if the close was <=2ticks below your entry. But it wasn't.

So.....without bar magnifier MC only has the following: OHLC... ie 4 data points. Open always comes before Close. High comes after low if close>open. Low comes after High if close<open.

I don't understand the assumptions you are working with.

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Order of signals within the backtesting

Postby turbofib » 12 Apr 2018

The system that is applied to the chart is a trendfollowing type that breaks the previous bar
(stop 1 tick .... profit 2 tick)

Referring to the link

https://www.multicharts.com/trading-sof ... ssumptions


the candle in question has:

Open: 2723.5
High: 2726.5
Low: 2722.25
Close: 2726

According to the rules of the link above we are in the case of Assumption 3

Open <(Low + (high-low) / 2) ===> 2723.5 <(2722.5+ (2726.5-2722.25) / 2)

So we are in Assumption 3

In the bar a short (2723) is performed, a short covering (cover 2723.5)
and finally a new long position (2726.25) ..

The long position remains in progress and is not closed in the day ...

But according to the rules of assumption3 it should be stopped (LOW = 2722.25) instead it is overtaken ..


Why? what rules are there for managing different intrabar signals?
Taking a quick look...it looks correct to me. Without bar magnifier MC is assuming that this candle opened, moved to its low, then to its high, then closed. Why? Because it is a green candle where c>o.

Again, just taking a glance, your short was stopped two ticks higher (ie a 2 tick stop). Your long would've been stopped out too if the close was <=2ticks below your entry. But it wasn't.

So.....without bar magnifier MC only has the following: OHLC... ie 4 data points. Open always comes before Close. High comes after low if close>open. Low comes after High if close<open.

I don't understand the assumptions you are working with.

read this:
https://www.multicharts.com/trading-sof ... ssumptions
i see assumptions n.3 (it's is in my case)..

it say: "the stop loss will be assumed to have executed first"
Attachments
assumption3.png
(47.41 KiB) Downloaded 770 times

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: Order of signals within the backtesting

Postby wilkinsw » 12 Apr 2018

It looks like my understanding of intrabar movement without BM was a little wrong.

But I still can't see where you are coming from. The open is closer to the low than the high. Therefore Open, Low,High,Close is the sequence. Therefore from these data points were: Short, stopped. Long, not stopped. Like I said the close is >than your stop. That looks exactly right to me for that candle.

I really can't see where you're coming from. Why do you think your long should be stopped out in this bar?

I suspect you've misunderstood this page:
https://www.multicharts.com/trading-sof ... ssumptions

Your "assumption 3" seems to talk about carrying a position into a bar and that said bar having a range that encompasses both your target and stop. It is explaining how MC decides whether you hit your target or stop.

In your example: Your stop would have only been elected if you had carried a position into that bar first.

I think you got off on the wrong foot by misunderstanding that page bud.
Last edited by wilkinsw on 12 Apr 2018, edited 4 times in total.

turbofib
Posts: 213
Joined: 11 May 2013
Has thanked: 67 times
Been thanked: 1 time

Re: Order of signals within the backtesting

Postby turbofib » 12 Apr 2018

Because ASSUMPTION n.3...read my link

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: Order of signals within the backtesting

Postby wilkinsw » 12 Apr 2018

Because ASSUMPTION n.3...read my link
Read my edited post above.

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

Re: Order of signals within the backtesting

Postby TJ » 12 Apr 2018

EasyLanguage works best when there is one action per bar, two the most.

If your trading strategy involves multiple actions intra-bar,
my advice is... to reduce the bar interval from 60 min to a lower minute count. eg 15 min, or even 5 min.

You have to adjust your codes and logics accordingly. It will involve some work, but it is the proper thing to do.

Just my 2 cents from past experiences.


Return to “MultiCharts”