Amibroker - AFL Examples

#21
Hello,

Thanks Praveen. I do have a very good collection of AFL codes. But since in the begining the response to the thread was vey low i thought members are not interested. Any way i would like to post more AFL if members are finding it useful for learning AFL programming. Feed backs from AFL experts like you on how to modify or improve on it to suit our trading requirements will be invaluable to forum members and me.

Regards

Saji

Hai Saji,

As I'd said, due to office work, I don't find time to read any posts at Traderji.com. Will surely go through them when I find time and let you know the comments.

BTW I'm learning AFL just for the past 2-3weeks, and about TA for past few months. I'm not into trading yet. So I wonder whether I can provide any 'good' feedback.

All the best,
Praveen.
 
#22
Hello,

But since in the begining the response to the thread was vey low i thought members are not interested.
I too had the same mindset when I started my thread on Amibroker. The reason for low participation might be due to less number of Amibroker users here at Traderji.

But I would be glad if our efforts are helpful for atleast one member, say atleast in the future. Lets not stop.

Praveen.
 
#23
Hello Praveen,

Feed backs from fresh and uncluttered minds are more challenging and interesting . So obviously being new to market is interesting. Respond when you are free. Not in a hurry at all.
 
#24
Hello Sanjay,

I am also a regular learner like you. I am not into full time trading due to my current occupation. But i do have quite a long experience in stock market(12 years). Earlier i used to do lot of daytrades. Now i am no longer into it. Infact few trades i tried recently were losers.

So i am back to what i am best at. Short trades lasting 2-6 days or even single day. In my opinion this seems to be the best alternative to make good money and also less tension of intraday trades. But doing some intraday trades in small quantities is very good for studying market movements.

The AFLs i posted are mostly for intraday trades as the majority forum members seems to concentrate on day trades. More over those AFLs were mostly meant to get a feel of AFL programming.

Like i have mentioned in earlier posts ultimately after some hard effort you will find two or three indicators which if used in combination will help you trade successfully in any market conditons. For this you have to spend considerable time in evaluvating various AFL codes. Do not ignore any AFL or Metastock code you come across.

One thing i can assure you some really good AFL codes are out in public. In all probability they are very simple and with few lines of codes. But they are the best ones to trade and make money.

I do not think you expect me to disclose my trading system. I will not be doing that. But i can assure you one or two i will post among many here will help you in your trading superbly. it is for you to find it out.

So since you are willing to give it a try and already has made some attempts i will give you a good AFL. It is called ichimokku. It is available in the library. But i have made certain modifications. The japanese are experts in trading and have better systems than western ones.

So open up your Amibroker , put this AFL on daily data, or weekly and study carefully what lines are doing under different market conditions and various scrips. it will give you lot of good profitable trades. But you need to find A WAY to avoid some false signals. Easisest method is to take the signal risk with proper money management and position size. ie get out with your commission loss or stoploss figure if trade goes against you or use it in combination with some other indicator. Another method is not to take long positions when price under MA(C,15). Vice versa for shorts. Keep a watch on the slope of MA(C,15) also to remove false signals.

One good feature of this AFL code is the lines does not vacillate too much . Only when there is a strong reversal of trend it crosses. When the trend is strong the lines are in smooth movement.

Another advantage is you can set your price targets and stoplosses using the red and blue lines. The DL line(black) is not necessary. I mask it using the // before plot statements. if necessary google and find more about ichimokku.

RSI(15) also used can be used as confirmation signal . I do not use volume in my systems other than to ensure liquidity of the scrip.

Kindly note i had altered the formula from its original code. original code is also attached with description of the indicator. I have used it on intraday trades also. So read carefully the code after taking out a printout and mark out important lines of the code, so that you understand why the lines react under different conditions or crosses occur etc.


Regards

Saji
 
Last edited:
#25
Hello Sanjay,

Have you checked out the Ichimokku AFL. Once you are ready i will take you through a couple of trades using daily data of few scrips.That is when to enter, Risk to reward ratio, Stop loss etc which will help you to trade safely in future.

Regards

Saji
 

SGM

Active Member
#26
Hello Sanjay,

Have you checked out the Ichimokku AFL. Once you are ready i will take you through a couple of trades using daily data of few scrips.That is when to enter, Risk to reward ratio, Stop loss etc which will help you to trade safely in future.

Regards

Saji
Hello Saji

I have downloaded the afls, will go thru them and post my queries, thankfully 2morrow being sunday, should get sufficient time .

Thanks and Regards
Sanjay
 
#28
Dear sajji;
Thanks for sharing ur modified AFL. Just downloaded & will check it 2morow.

I am new to trading & looking to get some clues to make money. I like to keep away from Day or Intraday trading being a risky one.
So awaiting ur next post.

Regards.....
 
#29
Here is a tidbit found on another site-


I am your constant companion;
I am your greatest helper or your heaviest burden.
I will push you onward or drag you down to failure.
I am at your command.

Half of the tasks that you do you might just as well
Turn over to me and I will do them quickly and correctly.

I am easily managed; you must merely be firm with me.
Show me exactly how you want something done.
After a few lessons, I will do it automatically.

I am the servant of all great people
and the regret of all failures as well.
Those who are great, I have made great.
Those who are failures, I have made failures.

I am not a machine but I will work with all its precision
Plus the intelligence of a person.

Now you may run me for profit or you may run me for ruin.
It makes no difference to me.

Take me, train me, be firm with me and
I will lay the world at your feet.
Be easy with me and I will destroy you.

I am called Habit!
 

SGM

Active Member
#30
Hello Saji

Just finished testing the ichimoku system you have uploaded. The results were not at all good. Even after using different data sets, did not get profitable results (gross overall).

After going thru the code I realized that we are using few variables, like 22 days for SL, 7 Days for TL, 44 days for HHV and LLV and again 22 days for DL.

I tried using the AB optimizer creating 2 variables with following range

SL - Range 18 - 24 Default 22
TL - Range 5 - 11 Default 7
for HHV & LLV we use 2*SL

/*
SL_Prd = Optimize( "No_of_Days for SL", 22, 18, 24, 1 );
TL_Prd = Optimize( "No_of_Days for TL", 7, 5, 11, 1 );
*/

This threw up many pairs of values that are much better than the default values. I am attaching the code (modified from your afl) and the results cvs file.

Points to note:

While using the ref function in AB never use a +ve shift, its as if we are looking in future and trading in past. Thankfully you had already commented out the part of code that was using look-ahead function. Ref can be used safely with -ve shift.

The optimization works only for a particular data set, we will have to look at the average performance and also eliminate extreme values.

Once again Thanks a lot for your time and efforts. Learning is never a One-Way Process. Looking ahead to many more fruitful interactions with you.

Warm Regards
Sanjay
 

Similar threads