- ago
Hi friends,

I´m trying to build a 3 Bars Hight Low Strategy using Building Blocks but I´m missing something.

Could someone help me building the strategy below:

1) Buy when the price hits the 3 Bars Simple Moving Average of the Lows and as a filter I would like to buy in the condition above only if the price is above the 21 bars SMA.
2) Sell when the price hits the 3 Bars Simple Moving Average of the Highs.

Thanks in advance.
Fernando.
#Strategy
0
328
Solved
15 Replies

Reply

Bookmark

Sort
- ago
#1
Olá Fernando,

Sure we can help.

1. What type of entry/exit order the strategy intends to work with?
2. As all the conditions are instantly available (e.g. Indicator #1 crosses/compare to Indicator #2), what difficulty are you facing?
0
- ago
#2
Do you mean something like this?!

0
- ago
#3
Actually, this is probably better:

0
- ago
#4
Hi Eugene,

Actually I would like to have the entry at market in the moment that the Price touches the SMA (Low, 3) of the Lows.

And Sell at market in the moment that the Price touches the SMA (High, 3) of the Highs.

I´m doing something wrong because the platform is buying and selling at the close of the candle.
0
- ago
#5
Hi Alkimist,

I saw that you considered the close of the candle above, but what I would like to do is buying the stock at market in the moment the price touches the SMA (Low, 3).
0
Glitch8
 ( 11.82% )
- ago
#6
You would accomplish this using a Limit order, not a Market order.

0
Best Answer
- ago
#7
QUOTE:
entry at market in the moment that the Price touches the SMA (Low, 3) of the Lows.

You cannot realistically do it because the closest time the signal can turn into order is either the bar's close (MarketClose) or next bar open (Market, i.e. @alchimist's version). And that's why I asked question #1.

What you can do is make it a Limit order to buy at the SMA(Low, 3) though - with an extra condition for the price to stay above the SMA(21).
0
- ago
#8
Hi Glitch,

Thank you very much. The way you built the strategy was the closest that I would like to be.

I will go forward with this building blocks.

Thanks a lot.
1
- ago
#9
Hi Eugene,

I believe what you´re saying is basically the same as Glitch did above, right?
I tested and it wasn´t perfect but it suits my analysis at the moment, ok?

Thanks a lot for your support.
Regards.
Fernando
0
Glitch8
 ( 11.82% )
- ago
#10
Just curious what wasn't perfect about the solution?
0
- ago
#11
Hi Glitch,
Sorry my delay.

When I saw the chart, not always the entry and/or the exit are being exactly when the price touches the SMA, but is pretty closer and I believe it will not interfere in the output.

Thanks again for your support.
Fernando.
0
Glitch8
 ( 11.82% )
- ago
#12
It's exactly touching the SMA of the PREVIOUS bar. The signals for the NEXT bar are based on the SMAs of the PREVIOUS bar. We can't know what the SMA for the CURRENT bar is until the market closes, and by that time it's too late to enter the trade right when the price touches that SMA.

If you want to see it visually line up, you can open it as a C# strategy and offset the SMAs 1 bar to the right using the >> operator.
0
- ago
#13
QUOTE:
We can't know what the SMA for the CURRENT bar is until the market closes


True, but topic starter can estimate the value of SMA on next bar by means of the RevEngSMATC indicator. It's a short for Reverse Engineered SMA's Tomorrow Close and it can be found in the TASC library.
0
Cone8
 ( 21.52% )
- ago
#14
RevEngSMATC doesn't really work that way. It estimates when crossover of the 2 source SMA series, usually by one bar in advance, when its value crosses over/under the source SMA series. The values themselves of RevEngSMATC are not important and are not useful - other than using it to detect the crossover.
0
Glitch8
 ( 11.82% )
- ago
#15
Yeah let’s not confuse things further here. I believe what I provided was exactly what Fernando was asking for.
0

Reply

Bookmark

Sort