Seek AFL coding expertise

#1
Hi , I have Supertrend and MACD AFL's but want them modified a little as per my requirements. I want them to consider the Heiken Ashi candlestick values and not the normal candlestick values when plotting signals. Can any AFL coding expert help please?
Thanks!
 
#2
I do not want to demoralize your adventurous exploration but just changing the default Candle OHLC values to Heiken-Ashi OHLC for the calculation of SuperTrend or MACD won't yield you anything magical.

Seban's SuperTrend is nothing but a Trailing Stop using Wilder's ATR (Average True Range). In order to formulate ATR, actual High Low prices are used; when you change that to Heikin-Ashi High Low, you are further deviating from the reality.

Similarly, MACD measures the difference between two Moving Averages (one fast, other slow) and tries to depict their relationship in terms of their Convergence and Divergence. Now ask yourself, are you in-tune with the real market when you calculate the Moving Average of Heikin-Ashi Close which is a distorted value of the Real actual close of a candle.

When markets trend all indicators show and behave in similar manner because they all are derived from the Price. Thus they all look beautiful on the left side of the chart but its a totally different story on the right of the chart - by no means, it has any power to forecast the future. Let the consolidation of price come, all indicators will whipsaw you out. This is a game of probabilities, so statistics matter not technical indication.

Keep things simple! Mixing up indicators only over-complicate things.

Desi Hindi: Rassi ka ganth kholna hain toh, us ganth to khologey? Ya aur ek ganth lagakey usko kholna chahogey! Anth mein ulajh hi jayoegey na !!!!

In English: If you want to untie a rope, would you untie that knot? Or make another knot to untie the previous knot! At the end, you will ultimately get entangled and confused !!!
 
Last edited:
#4
Hello

Take the advice of LL :up:


If you still want to attempt it, try this and see if it works for you
With Amibroker you can assign any values to the OLHC arrays . . .


Step 01: Plot your price chart;
Step 02: O1 = O; C1 = C; H1 = H; L1 = L;
Step 03: Plot your HA candles
Step 04: O = HAOpen; C = HAClose; H = HAHigh; L = HALow;
Step 05: Plot your ST
Step 06: Finally reset the OHLC to original from Step 2


Happy :)
 
#5
Thanks for all the messages. Points well noted and this takes me back to the task of rechecking if what LL says makes sense. I will check the supertrend signals on a normal candlestick with HA chart and compare the results to see if which of the two is better.

I completely agree it's a game of probabilities. As long as you turn the winning probability in your favour with bigger wins and smaller losses , one is set for success I think. Hope what I think is right :)

But my question still remains- any Afl coder out there who can help me a little bit with validating my hypothesis?
 
#6
I do not want to demoralize your adventurous exploration but just changing the default Candle OHLC values to Heiken-Ashi OHLC for the calculation of SuperTrend or MACD won't yield you anything magical.

Seban's SuperTrend is nothing but a Trailing Stop using Wilder's ATR (Average True Range). In order to formulate ATR, actual High Low prices are used; when you change that to Heikin-Ashi High Low, you are further deviating from the reality.

Similarly, MACD measures the difference between two Moving Averages (one fast, other slow) and tries to depict their relationship in terms of their Convergence and Divergence. Now ask yourself, are you in-tune with the real market when you calculate the Moving Average of Heikin-Ashi Close which is a distorted value of the Real actual close of a candle.

When markets trend all indicators show and behave in similar manner because they all are derived from the Price. Thus they all look beautiful on the left side of the chart but its a totally different story on the right of the chart - by no means, it has any power to forecast the future. Let the consolidation of price come, all indicators will whipsaw you out. This is a game of probabilities, so statistics matter not technical indication.

Keep things simple! Mixing up indicators only over-complicate things.

Desi Hindi: Rassi ka ganth kholna hain toh, us ganth to khologey? Ya aur ek ganth lagakey usko kholna chahogey! Anth mein ulajh hi jayoegey na !!!!

In English: If you want to untie a rope, would you untie that knot? Or make another knot to untie the previous knot! At the end, you will ultimately get entangled and confused !!!
I don't want to forecast the future. I don't think anyone can do that , in markets or in life. I just want to use the trend as a friend.
 
#7
I don't want to forecast the future. I don't think anyone can do that , in markets or in life. I just want to use the trend as a friend.
Do not commit the mistake of making friends! Because you yourself is your own biggest enemy in the Market. Statements like "Trend is your friend, until its ends" are meant to trap souls for the Market liquidity. By the time you catch a Trend; consolidation will exhaust you up both psychologically and financially. However, persistence will pay-off but not any shortcut or copy-paste formula!
 
#8
Do not commit the mistake of making friends! Because you yourself is your own biggest enemy in the Market. Statements like "Trend is your friend, until its ends" are meant to trap souls for the Market liquidity. By the time you catch a Trend; consolidation will exhaust you up both psychologically and financially. However, persistence will pay-off but not any shortcut or copy-paste formula!
Why do you say so ? I think it's not so difficult to catch a trend using Technical Analysis , isn't it?. That's what indicators are for. I understand very difficult trading trends with Fundamentals. The key is to trade on the right time frames with the right indicator parameters so that you don't get trapped into whipsaw trades so frequently.

Completely agree with persistence. Persistence, patience and perseverance! My favorite three!
 
#9
Why do you say so ? I think it's not so difficult to catch a trend using Technical Analysis , isn't it?. That's what indicators are for.
:)
How consistently?
 

Similar threads