How to code a pullback?

 

Hi all!

I am trying to code a pullback based on what price is doing. I want to use it when 3 moving averages are in line, so when price starts rising after a pullback I can enter the trend. I have tried to do this as a pullback to one of the MA, but it is not what I'm really looking for and I couldn't figure it out yet how to do it this other way.

Any ideas is greatly appreciated! :)

 
Pedro Severin:

Hi all!

I am trying to code a pullback based on what price is doing. I want to use it when 3 moving averages are in line, so when price starts rising after a pullback I can enter the trend. I have tried to do this as a pullback to one of the MA, but it is not what I'm really looking for and I couldn't figure it out yet how to do it this other way.

Any ideas is greatly appreciated! :)

There are many ways.

One way is to use oscillators like RSI or stochastic, or MACD, and wait for them to reach the oversold (i.e. bottom) region, then enter long when price starts to turn up (vice versa for short) - all while the 3 moving averages are in line. Or Bollinger bands - when price touches the lower band, enter long when it starts to turn up.

Another way is to scan for the recent high and low points in price, and calculate the pull back percentage and make decision based on fibonacci levels.

Yet another way is simply to base on X candles down, where X is a value you fix beforehand.

I believe the possibilities are endless, you just have to test it out with your 3 moving averages to see which works best.

 
Seng Joo Thio:

There are many ways.

One way is to use oscillators like RSI or stochastic, or MACD, and wait for them to reach the oversold (i.e. bottom) region, then enter long when price starts to turn up (vice versa for short) - all while the 3 moving averages are in line. Or Bollinger bands - when price touches the lower band, enter long when it starts to turn up.

Another way is to scan for the recent high and low points in price, and calculate the pull back percentage and make decision based on fibonacci levels.

Yet another way is simply to base on X candles down, where X is a value you fix beforehand.

I believe the possibilities are endless, you just have to test it out with your 3 moving averages to see which works best.

Hmmm I see...the idea is to enter to the tren on the pullback when the trend gains momentum again. Which approach should I take, considering this?

This is inspired by the 3 SMA system created by Hector deVille (idk if that system is still valid?).

 
Pedro Severin:

Hmmm I see...the idea is to enter to the tren on the pullback when the trend gains momentum again. Which approach should I take, considering this?

This is inspired by the 3 SMA system created by Hector deVille (idk if that system is still valid?).

I don't know about the Hector deVille system, so I'll just answer generically - using multiple MA system, the most straightforward way to determine whether a trend has gained momentum would be to check the price changes of the MA lines - greater changes from the last, and right after a pull back, would imply increasing price momentum.

Of course, there are also many other methods, which perhaps others will contribute :).