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
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
Rename
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?
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?
Do you mean something like this?!
Actually, this is probably better:
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.
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.
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).
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).
You would accomplish this using a Limit order, not a Market order.
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).
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.
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.
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
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
Just curious what wasn't perfect about the solution?
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.
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.
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.
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.
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.
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.
Yeah let’s not confuse things further here. I believe what I provided was exactly what Fernando was asking for.
Your Response
Post
Edit Post
Login is required