28 December 2011

United Nations: TIPAIMUKH DAM MUST BE STOPPED

http://www.change.org/petitions/united-nations-tipaimukh-dam-must-be-stopped?share_id=GmiIniXjov







শুধু ২ টা মিনিট সময় চাচ্ছি আপনার কাছে। দেশের জন্য ২ টা মিনিট সময় দিবেন কি ?

টিপাইমুখ বন্ধে জাতিসংঘের হস্তক্ষেপের জন্য দরকার ১ লক্ষ সাইন। আর সাইন করতে হবে আমাদের। আসুন, ২ মিনিট সময় ব্যয় করি দেশের জন্য। এই লিঙ্কে যান ~ http://chn.ge/sSklHz

First Name, Last Name, Email, Address, City এই ঘরগুলো পূরণ করুন। State ঘরে পাশে Outside U.S. এ ক্লিক করুন। দেখবেন State শব্দটি পরিবর্তিত হয়ে Country হয়েছে। এইবার সেখান থেকে Bangladesh সিলেক্ট করুন। Post Code এ আপনার এলাকার পোস্ট কোড দিন। যারা পোস্ট কোড জানেন না তারা ঢাকার পোস্ট কোড ১০০০ দিয়ে ঘরটি পূরণ করুন। তারপর Sign এ ক্লিক করে পিটিশনে সাইন শেষ করুন।

পোষ্ট কোড জানা না থাকলে নিচের লিংকে দেখুনঃ
ঢাকা বিভাগঃ http://bitly.com/rCGwNe
চট্টগ্রাম বিভাগঃ http://bitly.com/scBcDG
খুলনা বিভাগঃ http://bitly.com/v8j8rf
সিলেট বিভাগঃ http://bitly.com/sda4fp
বরিশাল বিভাগঃ http://bitly.com/rX8NlO
রাজশাহী ও রংপুর বিভাগঃ http://bitly.com/ulxLOh

অনেক ব্লগার আছেন এই পেইজে। তাদের অনুরোধ করব এই লেখাটি ব্লগে প্রকাশ করুন। অনেক পেইজের এডমিন আছেন তাদের অনুরোধ করব লেখাটি শেয়ার করুন। আমাদের কোনো ক্রেডিট দেওয়া লাগবে না, দেশের জন্য কাজ করছি, নিজের নাম কমানোর জন্য নয়। যারা এই লেখাটি পড়ছেন তারা এই লেখাটিকে শেয়ার করুন। যত সম্ভব লেখাটিকে ছড়িয়ে দিন।

দেশের জন্য ২ টা মিনিট সময় দিন, আর কিছু না হোক অন্তত নিজের বিবেকের কাছে স্বচ্ছ থাকবেন।

TA LINKS

http://www.investopedia.com/articles/technical/04/042804.asp#axzz1gy2Xe7UO

http://www.tradewithme.me/technical-analysis.html

21 December 2011

babylon tool bar remove / uninstal

babylon tool bar disgusting..suck..shit..

Manual Removal Guide for Babylon.Toolbar

The following instructions have been created to help you to get rid of "Babylon.Toolbar" manually.
Use this guide at your own risk; software should usually be better suited to remove malware, since it is able to look deeper.

If this guide was helpful to you, please consider donating towards this site.

Threat Details:

Categories:

* adware

Description:

Babylon Toolbar is a useless toolbar that gets installed by other software, for instance FoxTab Videoconverter. Legal age for installation is 18 while this fact is only mentioned in the terms.
Babylon Toolbar installs itself to the system, the Internet Explorer, Firefox and Google Chrome. The Babylon.Toolbar is almost identical to Toolbar.Facemood.

Removal Instructions:

Autorun:

Please use Spybot-S&D, RunAlyzer or msconfig.exe to remove the following autorun entries.

* Entries named "BabylonToolbar" and pointing to "?<$PROGRAMFILES>\BabylonToolbar\BabylonToolbar\*\BabylonToolbarsrv.exe? /md I".

Installed Software List:

You can try to uninstall products with the names listed below; for items identified by other properties or to avoid malware getting active again on uninstallation, use Spybot-S&D or RunAlyzer to locate and get rid of these entries.

* Products that have a key or property named "BabylonToolbar".

Files:

Please use Windows Explorer or another file manager of your choice to locate and delete these files.

* The file at "<$PROGRAMFILES>\Mozilla Firefox\searchplugins\babylon.xml".

Make sure you set your file manager to display hidden and system files. If Babylon.Toolbar uses rootkit technologies, use our RootAlyzer or our Total Commander anti-rootkit plugins.
You will have to use a global search for files without a name specified. Be extra careful, because just the name might not be enough to identify files!

Important: There are more files that cannot be safely described in simple words. Please use Spybot-S&D to remove them.

Folders:

Please use Windows Explorer or another file manager of your choice to locate and delete these folders.

* The directory at "<$APPDATA>\BabylonToolbar\BabylonToolbar".
* The directory at "<$APPDATA>\BabylonToolbar".
* The directory at "<$PROGRAMFILES>\BabylonToolbar\BabylonToolbar".
* The directory at "<$PROGRAMFILES>\BabylonToolbar".

Make sure you set your file manager to display hidden and system files. If Babylon.Toolbar uses rootkit technologies, use our RootAlyzer or our Total Commander anti-rootkit plugins.
You will have to use a global search for files without a name specified. Be extra careful, because just the name might not be enough to identify folders!

Important: There are more files that cannot be safely described in simple words. Please use Spybot-S&D to remove them.

Registry:

You can use regedit.exe (included in Windows) to locate and delete these registry entries.

* A key in HKEY_CLASSES_ROOT\ named "Babylon.dskBnd.*", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "Babylon.dskBnd", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "bbylnApp.appCore.*", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "bbylnApp.appCore", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "bbylntlbr.bbylntlbrHlpr.*", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "bbylntlbr.bbylntlbrHlpr", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "bbylntlbr.xtrnl.*", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "bbylntlbr.xtrnl", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "escort.escortIEPane.*", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "escort.escortIEPane", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "escort.escrtBtn.*", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "esrv.BabylonESrvc.*", plus associated values.
* A key in HKEY_CLASSES_ROOT\ named "esrv.BabylonESrvc", plus associated values.
* Delete the registry key "{09C554C3-109B-483C-A06B-F14172F1A947}" at "HKEY_CLASSES_ROOT\TypeLib\".
* Delete the registry key "{2EECD738-5844-4a99-B4B6-146BF802613B}" at "HKEY_CLASSES_ROOT\CLSID\".
* Delete the registry key "{2EECD738-5844-4a99-B4B6-146BF802613B}" at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\".
* Delete the registry key "{3718D0AF-A3B8-4F5E-86F3-FAD8D02043BE}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{4E1E9D45-8BF9-4139-915C-9F83CC3D5921}" at "HKEY_CLASSES_ROOT\TypeLib\".
* Delete the registry key "{6E8BF012-2C85-4834-B10A-1B31AF173D70}" at "HKEY_CLASSES_ROOT\TypeLib\".
* Delete the registry key "{706D4A4B-184A-4434-B331-296B07493D2D}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{78868069-5D96-4B47-BE52-3D625EE3D7CB}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{78888F8B-D5E4-43CE-89F5-C8C18223AF64}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{8B8558F6-DC26-4F39-8417-34B8934AA459}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{94C0B25D-3359-4B10-B227-F96A77DB773F}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{98889811-442D-49dd-99D7-DC866BE87DBC}" at "HKEY_CLASSES_ROOT\CLSID\".
* Delete the registry key "{9E393F82-2644-4AB6-B994-1AD39D6C59EE}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{A3A2A5C0-1306-4D1A-A093-9CECA4230002}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{AD25754E-D76C-42B3-A335-2F81478B722F}" at "HKEY_CLASSES_ROOT\AppID\".
* Delete the registry key "{AD25754E-D76C-42B3-A335-2F81478B722F}" at "HKEY_CLASSES_ROOT\TypeLib\".
* Delete the registry key "{B0B75FBA-7288-4FD3-A9EB-7EE27FA65599}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{B12E99ED-69BD-437C-86BE-C862B9E5444D}" at "HKEY_CLASSES_ROOT\TypeLib\".
* Delete the registry key "{B173667F-8395-4317-8DD6-45AD1FE00047}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{B8276A94-891D-453C-9FF3-715C042A2575}" at "HKEY_CLASSES_ROOT\CLSID\".
* Delete the registry key "{BDB69379-802F-4eaf-B541-F8DE92DD98DB}" at "HKEY_CLASSES_ROOT\AppID\".
* Delete the registry key "{BFE569F7-646C-4512-969B-9BE3E580D393}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{C2434722-5C85-4CA0-BA69-1B67E7AB3D68}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{C2996524-2187-441F-A398-CD6CB6B3D020}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{C8D424EF-CB21-49A0-8659-476FBAB0F8E8}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{D7EE8177-D51E-4F89-92B6-83EA2EC40800}" at "HKEY_CLASSES_ROOT\TypeLib\".
* Delete the registry key "{E047E227-5342-4D94-80F7-CFB154BF55BD}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{E3F79BE9-24D4-4F4D-8C13-DF2C9899F82E}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{E46C8196-B634-44a1-AF6E-957C64278AB1}" at "HKEY_CLASSES_ROOT\CLSID\".
* Delete the registry key "{E77EEF95-3E83-4BB8-9C0D-4A5163774997}" at "HKEY_CLASSES_ROOT\Interface\".
* Delete the registry key "{FFB9ADCB-8C79-4C29-81D3-74D46A93D370}" at "HKEY_CLASSES_ROOT\CLSID\".
* Delete the registry key "BabylonToolbar" at "HKEY_CURRENT_USER\Software\".
* Delete the registry key "BabylonToolbar" at "HKEY_LOCAL_MACHINE\SOFTWARE\".
* Delete the registry key "dhkplhfnhceodhffomolpfigojocbpcb" at "HKEY_LOCAL_MACHINE\SOFTWARE\Google\chrome\Extensions\".
* Delete the registry key "escort.DLL" at "HKEY_CLASSES_ROOT\AppID\".
* Delete the registry key "esrv.EXE" at "HKEY_CLASSES_ROOT\AppID\".
* Delete the registry value "{98889811-442D-49dd-99D7-DC866BE87DBC}" at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Toolbar\".

If Babylon.Toolbar uses rootkit technologies, use our RegAlyzer, RootAlyzer or our Total Commander anti-rootkit plugins.

Browser:

The following browser plugins or items can either be removed directly in your browser, or through the help of e.g. Spybot-S&D or RunAlyzer.

* Please check your bookmarks for links to "search.babylon.com".

Final Words:

If neither Spybot-S&D nor self help did resolve the issue or you would prefer one on one help,

1. Please read these instructions before requesting assistance,
2. Then start your own thread in the Malware Removal Forum where a volunteer analyst will advise you as soon as available.

Friday is offline Reply With Quote

19 December 2011

certificate format sample

http://www.scribd.com/doc/12639295/Salary-Certificate

http://www.citehr.com/224707-salary-certificate-formate.html#post1009693

19 November 2011

ড.আতিউর রহমান : রাখাল থেকে বাংলাদেশ ব্যাংকের গভর্নর

জাহিদ ইকবাল,নিউজ এজেন্সি টোয়েন্টিফোর,ঢাকা - দেশবরেণ্য অর্থনীতিবিদ ও বাংলাদেশ ব্যাংকের গভর্ণর ড.আতিউর রহমানের ছেলেবেলা কেটেছে গরু-ছাগল চড়িয়ে! সেখান থেকে আজকের অবস্থানে পৌছাতে তাঁকে অনেক ত্যাগ স্বীকার ও সংগ্রাম করতে হয়েছে।

প্রিয় পাঠক আসুন সেই কাহিনী শুনি তাঁর নিজের-ই মুখে:--- আমার জন্ম জামালপুর জেলার এক অজপাড়াগাঁয়ে । ১৪ কিলোমিটার দূরের শহরে যেতে হতো পায়ে হেঁটে বা সাইকেলে চড়ে । পুরো গ্রামের মধ্যে একমাত্র মেট্রিক পাস ছিলেন আমার চাচা মফিজউদ্দিন ।

আমার বাবা একজন অতি দরিদ্র ভূমিহীন কৃষক। আমরা পাঁচ ভাই, তিন বোন । কোন রকমে খেয়ে না খেয়ে দিন কাটতো আমাদের।
আমার দাদার আর্থিক অবস্থা ছিল মোটামুটি । কিন্তু তিনি আমার বাবাকে তাঁর বাড়িতে ঠাঁই দেননি । দাদার বাড়ি থেকে খানিকটা দূরে একটা ছনের ঘরে আমরা এতগুলো ভাই-বোন আর বাবা-মা থাকতাম । মা তাঁর বাবার বাড়ি থেকে নানার সম্পত্তির সামান্য অংশ পেয়েছিলেন । তাতে তিন বিঘা জমি কেনা হয় ।

চাষাবাদের জন্য অনুপযুক্ত ওই জমিতে বহু কষ্টে বাবা যা ফলাতেন, তাতে বছরে ৫/৬ মাসের খাবার জুটতো । দারিদ্র্য কি জিনিস, তা আমি মর্মে মর্মে উপলব্ধি করেছি-খাবার নেই, পরনের কাপড় নেই, কি এক অবস্থা!!
আমার মা সামান্য লেখাপড়া জানতেন । তাঁর কাছেই আমার পড়াশোনার হাতেখড়ি । তারপর বাড়ির পাশের প্রাথমিক বিদ্যালয়ে ভর্তি হই । কিন্তু আমার পরিবারে এতটাই অভাব যে,আমি যখন তৃতীয় শ্রেণীতে উঠলাম,তখন আর পড়াশোনা চালিয়ে যাওয়ার সুযোগ থাকলো না । বড় ভাই আরো আগে স্কুল ছেড়ে কাজে ঢুকেছেন । আমাকেও লেখাপড়া ছেড়ে রোজগারের পথে নামতে হলো।
আমাদের একটা গাভী আর কয়েকটা খাঁসি ছিল । আমি সকাল থেকে সন্ধা পর্যন্ত ওগুলো মাঠে চড়াতাম।

বিকেল বেলা গাভীর দুধ নিয়ে বাজারে গিয়ে বিক্রি করতাম । এভাবে দুই ভাই মিলে যা আয় করতাম, তাতে কোন রকমে দিন কাটছিল । কিছুদিন চলার পর দুধ বিক্রির আয় থেকে সঞ্চিত আট টাকা দিয়ে আমি পান-বিড়ির দোকান দেই । প্রতিদিন সকাল থেকে সন্ধ্যা পর্যন্ত দোকানে বসতাম । পড়াশোনা তো বন্ধই,আদৌ কি করবো- সেই স্বপ্নও ছিল না।

এক বিকেলে বড় ভাই বললেন, আজ স্কুল মাঠে নাটক হবে । স্পষ্ট মনে আছে, তখন আমার গায়ে দেয়ার মতো কোন জামা নেই । খালি গা আর লুঙ্গি পরে আমি ভাইয়ের সঙ্গে নাটক দেখতে চলেছি । স্কুলে পৌছে আমি তো বিস্ময়ে হতবাক! চারদিকে এত আনন্দময় চমৎকার পরিবেশ । আমার মনে হলো,আমিতো আর সবার মতোই হতে পারতাম । সিদ্ধান্ত নিলাম,আমাকে আবার স্কুলে ফিরে আসতে হবে।
নাটক দেখে বাড়ি ফেরার পথে বড় ভাইকে বললাম,আমি কি আবার স্কুলে ফিরে আসতে পারি না ? আমার বলার ভঙ্গি বা করুণ চাহনি দেখেই হোক কিংবা অন্য কোন কারণেই হোক কথাটা ভাইয়ের মনে ধরলো । তিনি বললেন,ঠিক আছে কাল হেডস্যারের সঙ্গে আলাপ করবো।

পরদিন দুই ভাই আবার স্কুলে গেলাম । বড় ভাই আমাকে হেডস্যারের রুমের বাইরে দাঁড় করিয়ে রেখে ভিতরে গেলেন । আমি বাইরে দাড়িয়ে স্পষ্ট শুনছি, ভাই বললেন আমাকে যেন বার্ষিক পরীক্ষায় অংশগ্রহনের সুযোগটুকু দেওয়া হয় । কিন্তু হেডস্যার অবজ্ঞার ভঙ্গিতে বললেন, সবাইকে দিয়ে কি লেখাপড়া হয়!
স্যারের কথা শুনে আমার মাথা নিচু হয়ে গেল। যতখানি আশা নিয়ে স্কুলে গিয়েছিলাম,স্যারের এক কথাতেই সব ধুলিস্মাৎ হয়ে গেল । তবু বড় ভাই অনেক পীড়াপীড়ি করে আমার পরীক্ষা দেওয়ার অনুমতি যোগার করলেন । পরীক্ষার তখন আর মাত্র তিন মাস বাকি । বাড়ি ফিরে মাকে বললাম, আমাকে তিন মাসের ছুটি দিতে হবে । আমি আর এখানে থাকবো না । কারণ ঘরে খাবার নেই,পরনে কাপড় নেই- আমার কোন বইও নেই, কিন্তু আমাকে পরীক্ষায় পাস করতে হবে।
মা বললেন, কোথায় যাবি? বললাম, আমার এককালের সহপাঠী এবং এখন ক্লাসের ফার্স্ট বয় মোজাম্মেলের বাড়িতে যাবো । ওর মায়ের সঙ্গে আমার পরিচয় আছে । যে ক’দিন কথা বলেছি,তাতে করে খুব ভালো মানুষ বলে মনে হয়েছে । আমার বিশ্বাস, আমাকে উনি ফিরিয়ে দিতে পারবেন না।

দুরু দুরু মনে মোজাম্মেলের বাড়ি গেলাম । সব কিছু খুলে বলতেই খালাম্মা সানন্দে রাজি হলেন । আমার খাবার আর আশ্রয় জুটলো; শুরু হলো নতুন জীবন । নতুন করে পড়াশোনা শুরু করলাম। প্রতিক্ষণেই হেডস্যারের সেই অবজ্ঞাসূচক কথা মনে পড়ে যায় ,জেদ কাজ করে মনে; আরো ভালোকরে পড়াশোনা করি।

যথাসময়ে পরীক্ষা শুরু হলো । আমি এক-একটি পরীক্ষা শেষ করছি আর ক্রমেই যেন উজ্জীবিত হচ্ছি। আমার আত্মবিশ্বাসও বেড়ে যাচ্ছে । ফল প্রকাশের দিন আমি স্কুলে গিয়ে প্রথম সারিতে বসলাম হেডস্যার ফলাফল নিয়ে এলেন । আমি লক্ষ্য করলাম , পড়তে গিয়ে তিনি কেমন যেন দ্বিধান্বিত । আড়চোখে আমার দিকে তাকাচ্ছেন । তারপর ফল ঘোষনা করলেন । আমি প্রথম হয়েছি ! খবর শুনে বড় ভাই আনন্দে কেঁদে ফেললেন । শুধু আমি নির্বিকার-যেন এটাই হওয়ার কথা ছিল।

বাড়ি ফেরার পথে সে এক অভূতপূর্ব দৃশ্য । আমি আর আমার ভাই গর্বিত ভংগিতে হেঁটে আসছি । আর পিছনে এক দল ছেলেমেয়ে আমাকে নিয়ে হৈ চৈ করছে, স্লোগান দিচ্ছে । সারা গাঁয়ে সাড়া পড়ে গেল! আমার নিরক্ষক বাবা, যারঁ কাছে ফার্স্ট আর লাস্ট একই কথা- তিনিও আনন্দে আত্মহারা; শুধু এইটুকু বুঝলেন যে, ছেলে বিশেষ কিছু একটা করেছে।যখন শুনলেন আমি ওপরের ক্লাসে উঠেছি, নতুন বই লাগবে, পরদিনই ঘরের খাসিটা হাটে নিয়ে গিয়ে ১২টাকায় বিক্রি করে দিল। তারপর আমাকে নিয়ে জামালপুর গেলেন। সেখানকার নবনূর লাইব্রেরী থেকে নতুন বই কিনলাম।

আমার জীবনযাত্রা এখন সর্ম্পূন বদলে গেছে। আমি রোজ স্কুলে যাই। অবসরে সংসারের কাজ করি। ইতোমধ্যে স্যারদের সুনজরে পড়ে গেছি। ফয়েজ মৌলবী স্যার আমাকে তারঁ সন্তানের মত দেখাশুনা করতে লাগলেন। সবার আদর,যতœ, øেহে আমি ফার্স্ট হয়েই পঞ্চম শ্রেনীতে উঠলাম।এতদিনে গ্রামের একমাত্র মেট্রিক পাশ মফিজউদ্দিন চাচা আমার খোঁজ নিলেন। তারঁ বাড়ীতে আমার আশ্রয় জুটলো।
প্রাথমিক শিক্ষা শেষ করে আমি দিঘপাইত জুনিয়র হাইস্কুলে ভর্তি হই। চাচা ওই স্কুলের শিক্ষক। অন্য শিক্ষকরাও আমার সংগ্রামের কথা জানতেন। তাই সবার বাড়তি আদর-ভালবাসা পেতাম।

আমি যখন সপ্তম শ্রেনীতে পেরিয়ে অষ্টম শ্রেণীতে উঠবো, তখন চাচা একদিন কোথেকে যেন একটা বিজ্ঞাপন কেটে নিয়ে এসে আমাকে দেখালেন। ওটা ছিল ক্যাডেট কলেজে ভর্তির বিজ্ঞাপন। যথাসময়ে ফরম পূরণ করে পাঠালাম।

এখানে বলা দরকার, আমার নাম ছিল আতাউর রহমান। কিন্তু ক্যাডেট কলেজের ভর্তি ফরমে স্কুলের হেডস্যার আমার নাম আতিউর রহমান লিখে চাচাকে বলেছিলেন, এই ছেলে একদিন অনেক বড় কিছু হবে। দেশে অনেক আতাউর আছে। ওর নামটা একটু আলাদা হওয়া দরকার; তাই আতিউর করে দিলাম।

আমি রাত জেগে পড়াশোনা করে প্রস্তুতি নিলাম। নির্ধারিত দিনে চাচার সঙ্গে পরীক্ষা দিতে রওনা হলাম। ওই আমার জীবনে প্রথম ময়মনসিংহ যাওয়া। গিয়ে সবকিছু দেখে তো চক্ষু চড়কগাছ। এত এত ছেলের মধ্যে আমিই কেবল পায়জামা আর স্পঞ্জ পরে এসেছি। আমার মনে হলো, না আসাটাই ভালো ছিল। অহেতুক কষ্ট করলাম। ভাবলাম হবে না। কিন্তু দুই মাস পর চিঠি পেলাম, আমি নির্বাচিত হয়েছি। এখন চূড়ান্ত পরীক্ষার জন্য ঢাকা ক্যান্টনমেন্টে যেতে হবে।

সবাই খুব খুশি; কেবল আমিই হতাশ। আমার একটা প্যান্ট নেই, যেটা পরে যাবো। শেষে স্কুলের কানাই লাল বিশ্বাসের ফুলপ্যান্টটা ধার করলাম। আর একটা শার্ট যোগাড় হলো। আমি আর চাচা অচেনার ঢাকার উদ্দেশে রওনা হলাম। চাচা শিখিয়ে দিলেন, মৌখিক পরীক্ষা দিতে গিয়ে আমি যেন দরজার কাছে দাড়িঁয়ে বলি: ম্যা আই কাম ইন স্যার? ঠিক মতোই বললাম। তবে এত উচ্চস্বরে বললাম যে, উপস্থিত সবাই হো হো করে হেসে উঠলো।
পরীক্ষকদের একজন মির্জাপুর ক্যাডেট কলেজের এম. ডাব্লিউ. পিট আমাকে আপদমস্তক নিরীক্ষণ করে সবকিছু আচঁ করে ফেললেন। পরম øেহে আমাকে বসালেন। মুহুর্তের মধ্যে তিনি আমার খুব আপন হয়ে গেলেন। আমার মনে হলো, তিনি থাকলে আমার কোন ভয় নেই। পিট স্যার আমার লিখিত পরীক্ষার খাতায় চোখ বুলিয়ে নিলেন। তারপর অন্য পরীক্ষকদের সঙ্গে ইংরেজীতে কী-সব আলাপ করলেন। আমি সবটা না বুঝলেও আচঁ করতে পারলাম যে, আমাকে তাদেঁর পছন্দ হয়েছে। তবে তারাঁ কিছুুই বললেন না। পরদিন ঢাকা শহর ঘুরে দেখে বাড়ি ফিরে এলাম। যথারীতি পড়াশোনায় মনোনিবেশ করলাম। কারন আমি ধরে নিয়েছি আমার চান্স হবে না।

হঠাৎ তিন মাস পর চিঠি এলো। আমি চূড়ান্তভাবে নির্বাচিত হয়েছি। মাসে ১৫০ টাকা বেতন লাগবে। এর মধ্যে ১০০ টাকা দেওয়া হবে, বাকি ৫০ টাকা আমার পরিবারকে যোগান দিতে হবে। চিঠি পড়ে মন ভেঙ্গে গেল। যেখানে আমার পরিবারের তিনবেলা খাওয়ার নিশ্চয়তা নেই, আমি চাচার বাড়িতে মানুষ হচ্ছি, সেখানে প্রতিমাসে ৫০ টাকা বেতন যোগানোর কথা চিন্তাও করা যায় না!

এই যখন অবস্থা, তখন প্রথমবারের মতো আমার দাদা সবর হলেন। এত বছর পর নাতির (আমার) খোঁজ নিলেন। আমাকে অন্য চাচাদের কাছে নিয়ে গিয়ে বললেন, তোমরা থাকতে নাতি আমার এত ভালো সুযোগ পেয়েও পড়তে পারবে না? কিন্তু তাদের অবস্থাও খুব বেশি ভালো ছিল না। তারাঁ বললেন, একবার না হয় ৫০ টাকা যোগাড় করে দেবো, কিন্তু প্রতি মাসে তো সম্ভব নয়। দাদাও বিষয়টা বুঝলেন।
আমি আর কোন আশার আলো দেখতে না পেয়ে সেই ফয়েজ মৌলভী স্যারের কাছে গেলাম। তিনি বললেন, আমি থাকতে কোন চিন্তা করবে না। পরদিন আরো দুইজন সহকর্মী আর আমাকে নিয়ে তিনি হাটে গেলেন। সেখানে গামছা পেতে দোকানে দোকানে ঘু-রলেন। সবাইকে বিস্তারিত বলে সাহায্য চাইলেন। সবাই সাধ্যমতো আট আনা, চার আনা, এক টাকা, দুই টাকা দিলেন। সব মিলিয়ে ১৫০ টাকা হলো। আর চাচারা দিলেন ৫০ টাকা। এই সামান্য টাকা সম্বল করে আমি মির্জাপুর ক্যাডেট কলেজে ভর্তি হলাম। যাতায়াত খরচ বাদ দিয়ে আমি ১৫০ টাকায় তিন মাসের বেতন পরিশোধ করলাম। শুরু হলো অন্য এক জীবন।

প্রথম দিনেই এম. ডাব্লিউ. পিট স্যার আমাকে দেখতে এলেন। আমি সব কিছু খুলে বললাম। আরো জানালাম যে, যেহেতু আমার আর বেতন দেওয়ার সামর্থ্য নেই, তাই তিনমাস পর ক্যাডেট থেকে চলে যেতে হবে। সব শুনে স্যার আমার বিষয়টা বোর্ড মিটিয়ে তুললেন এবং পুরো ১৫০ টাকাই বৃত্তির ব্যবস্থা করে দিলেন। সেই থেকে আমাকে আর পিছনে ফিরে তাকাতে হয়নি।এস.এস.সি পরীক্ষায় ঢাকা বোর্ডে ৫ম স্থান অধিকার করলাম এবং আরো অনেক সাফল্যের মুকুট যোগ হলো।

আমার জীবনটা সাধারণ মানুষের অনুদানে ভরপুর। পরবর্তীকালে আমি আমার এলাকায় স্কুল করেছি, কলেজ করেছি। যখন যাকে যতটা পারি, সাধ্যমত সাহায্য সহযোগিতা করি। কিন্তু সেই যে হাট থেকে তোলা ১৫০ টাকা!! সেই ঋণ আজও শোধ হয়নি। আমার সমগ্র জীবন উৎসর্গ করলেও সেই ঋণ শোধ হবে না। শোধ হবার নয়!!

26 October 2011

Range Constriction for Amibroker AFL

This is a complete trading system which can be applied to a chart, backtested or used as an exploration for buy/sell signals.

It has backtested profitably on all markets I have tested it on.

Basically it looks for stocks that are trading in a reduced range compared to the previous period. For stocks that are trading at recent highs it will buy when the stock moves up within this range, it shorts when the stock moves lower within this range. For exits it either sells into increasing strength or if when the price pulls back (opposite for shorts).

When run as an exploration it will produce a -1 for short, 1 for buy, -99 for sell, 99 for cover and 0 for hold.


PosQty = 1000; // You can define here how many open positions you want
SetOption("MaxOpenPositions", PosQty);
//PositionSize = 1000/PosQty; // invest 100% of portfolio equity divided by Max. position count
SetPositionSize( 1, spsShares );


///////////////////////////////////////////////////////////////////////////////
// Range Constriction
// Finds stocks that are trading in a reduced range compared to previous period.
// Buys when in the reduced range at a recent high price, Shorts when in the reducred range at a recent low price.
// Sells when the stock slows or it makes a sharp move up, Covers when the stock rises or makes a sharp move down


H5 = HHV(H,5); L5 = LLV(L,5);
H10 = HHV(H,10); L10 = LLV(L,10);
H20 = HHV(H,20); L20 = LLV(L,20);
H30 = HHV(H,30); L30 = LLV(L,30);

Range1 = H5-L5 < (Ref(H5,-5)-Ref(L5,-5))*0.5; Range2 = H10-L10 < (Ref(H10,-10)-Ref(L10,-10))*0.5; Range3 = H20-L20 < (Ref(H20,-20)-Ref(L20,-20))*0.5; Range4 = H30-L30 < (Ref(H30,-30)-Ref(L30,-30))*0.5; Consolidation = Ref(Range1,-1) OR Ref(range2,-1) OR Ref(range3,-1) OR Ref(range4,-1) ; Top = C == HHV(C,5); Bottom = C == LLV(C,5); Buy = top AND Consolidation AND C>1 AND C*MA(V,30)>10000000 AND V>1000000 AND C>Ref(C,-1)*1.015
AND C>O AND C>MA(C,50) AND C>LLV(C,200)*2 AND Trix(12)>0;

Sell = CMA(C,10)*1.25 AND NOT Buy OR RSI(2)>95 AND NOT Buy;
InLong = Flip(Buy, Sell);

Short = bottom AND Consolidation AND C>5 AND V>1000000 AND C*MA(V,30)>10000000 AND CMA(C,5) AND NOT Short OR C0, 1,(IIf(Short>0, -1,0))))))),"Buy/Sell",1.0);

08 October 2011

DSE BULL TRAY AND EXIMP

http://jaywalkable.wordpress.com/

http://www.entrepreneur.com/article/41846

http://www.entrepreneur.com/article/220374


http://www.foreign-trade.com/reference/impexp.htm


http://spyglasspoint.com/

07 October 2011

VORTEX

Vortex Indicator w/ Histogram for Amibroker (AFL)


// Vortex Indicator
// S&C Traders Tips Jan 2010
period = Param("Period", 14, 2 );

VMP = Sum( abs( H - Ref( L, -1 ) ), period );
VMM = Sum( abs( L - Ref( H, -1 ) ), period );
STR = Sum( ATR( 1 ), period );

VIP = VMP / STR;
VIM = VMM / STR;

//Plot( VIP, "VI"+period+"+", colorBlue);
//Plot( VIM, "VI"+period+"-", colorRed );


Hist = VIP - VIM;
HistPrev = Ref(Hist,-1);

Color = IIf(Hist>HistPrev,colorCustom9,
IIf(hist0,colorCustom11,
IIf(hist<0,colorCustom8,colorWhite)); Plot( Hist, "", color, styleHistogram+styleOwnScale+styleThick ); Vortex Indicator System for Amibroker (AFL) // Vortex Indicator // S&C Traders Tips Jan 2010 period = Param("Period" , 14, 2 ); VMP = Sum( abs( H - Ref( L, -1 ) ), period ); VMM = Sum( abs( L - Ref( H, -1 ) ), period ); STR = Sum( ATR( 1 ), period ); VIP = VMP / STR; VIM = VMM / STR; Plot( VIP, "VI"+period+ "+", colorBlue); Plot( VIM, "VI"+period+ "-", colorRed ); //The system is defined as: //- Go long when the VI (or Dmi) goes from less than zero to greater than //zero. //- Go short when the VI (or Dmi) goes from above zero to less than zero. // - All trades are placed "next day market on open." // That would translate to: SetTradeDelays( 1,1,1,1); // everything delayed 1 day Buy = VIP > 0 AND Ref(VIP,-1) < 0; BuyPrice = Open; Sell = VIP < 0 and Ref(VIP,-1) > 0;
SellPrice = Open;
Short = Sell;
Cover = Buy;



VORTEX OSCILI


_SECTION_BEGIN("Vortex Oscillator");

// Vortex Indicator
// S&C Traders Tips Jan 2010
SetChartBkColor(colorBlack);
SetBarsRequired(sbrAll);
period = Param("Period", 21, 2 );
VMP = Sum( abs( H - Ref( L, -1 ) ), period );
VMM = Sum( abs( L - Ref( H, -1 ) ), period );
STR = Sum( ATR( 10 ), period );

VIP = VMP / STR;
VIM = VMM / STR;
K1=VIP-VIM;
K=TEMA(K1,7);
ifish=EMA(EMA(EMA(EMA(K,3),3),3),3);
Color=IIf(ifish>0,IIf(ifish>Ref(ifish,-1),colorGreen,colorYellow),IIf(ifish>Ref(ifish,-1),colorBlue,colorRed));
Plot(ifish," Vortex Oscillator ",Color,styleHistogram | styleThick, maskHistogram);
Plot(0,"",colorYellow,styleDashed);


_SECTION_END();

04 October 2011

AFL CODE SITE

http://www.aussiestockforums.com/forums/index.php

http://www.imageview.us/amibroker/


http://www.traders.com/index.php/sac-magazine/departments/traders-tips/182-amibroker-spearman-indicator--valcu-article-code

02 October 2011

Trend Quality Indicators for Amibroker (AFL)

Trend Quality Indicators for Amibroker (AFL)


Originally described in Stocks & Commodities April 2004, by David Sepiashvili.
The trend-quality indicator (or Q-indicator) is a trend detection and estimation tool that is based on a two-step filtering technique. It measures cumulative price changes over term-oriented semicycles and relates them to ‘noise.’ The approach reveals congestion and trending periods of the price movement and focuses on the most important trends, evaluating their strength in the process. The indicator is presented in a centered oscillator and banded oscillator format.

Both Q-Indicator (the Trend Quality one) and the B-Indicator (trend-noise Balance Indicator) can be displayed (alternatively).

Different crossover signals can be easily added by just adding the required string in ParamList (the string SHALL follows the convention ?MA m1,m2 where ?MA is the MA type (EMA, SMA or WMA) and m1,m2 are the period ALWAYS in 2 digits (i.e. 5 shall be written as 05)

Q-indicator has 3 levels: 2(+/-) and 5(+/-): 0 to 2 means weak or NO trend; 2 to 5 means moderate trend, >= 5 means strong trend (Up trend if positive, Down trend if negative).

B-Indicator fluctuates between 0 to 100. It is better suited to identifies overbought/oversold levels. It has 2 levels: 65 and 80. 0 to 65 means NO or weak trend, 65 to 80 means moderate trend and >= 80 means strong trend.

I like this indicator since it is quite “agnostic” about the chosen parameters (Obviously the crossover MAs do matter !!).

Here is a screenshot of how the indicator looks:



Trend Quality Indicators for Amibroker (AFL)

In "Trend-Quality Indicator" in this issue, David Sepiashvili presents an innovative trend-detection tool -- the trend-quality indicator -- that attempts to estimate the trend in relation to noise.

Calculations presented in the article can be easily reproduced using AmiBroker Formula Language. The only tricky part is a piecewise exponential moving average that restarts the calculations on every moving average crossover, but we managed to implement it in two lines of code, thanks to AmiBroker's powerful Ama2 function, which allows easy implementation of all kinds of single-order infinite impulse response filters.

Listing 1 shows ready-to-use indicator code to plot the Q-indicator. In AmiBroker, select Indicator Builder from the Analysis menu, click the "Add" button, enter the formula, and then press "Apply." Figure 3 shows a sample chart.


// Piecewise EMA is an EMA that restarts calculations each time
// the 'sincebar' argument is true
function PiecewiseEMA( array, range, sincebar )
{
factor = IIf( sincebar, 1, 2/(range+1) );
return AMA2( array, factor, 1-factor );
}
// parameters
m=4;
n=250;
// generate reversal signals based on EMA crossover rule
Lpf1 = EMA( C, 7 );
Lpf2 = EMA( C, 15 );
CrossPoint = Cross( Lpf1, Lpf2 ) OR Cross( Lpf2, Lpf1 );
Periods = BarsSince( CrossPoint );
// variable bar sum
DC = Close - Ref( Close, -1 );
CPC = Sum( DC, Periods );
// smooth CPC by piecewise 4 bar EMA
Trend = PiecewiseEMA( CPC, 4, CrossPoint );
// noise
DT = CPC - Trend;
Noise = 2 * sqrt( MA( DT^2, n ) );
// alternative 'linear' noise calculation
// Noise = 2 * MA( abs( DT ), n ) );
QIndicator = Trend/Noise;
Plot(sign(Lpf1-Lpf2), "Rev", colorRed );
Plot( Qindicator, "Qindicator", colorGreen, styleHistogram);
PlotGrid( -1 );
PlotGrid( 1 );
PlotGrid( 2 );
PlotGrid( -2 );
PlotGrid( 5 );
PlotGrid( 5);

Trend Quality Indicators for Amibroker (AFL)

Trend Quality Indicators for Amibroker (AFL)


Originally described in Stocks & Commodities April 2004, by David Sepiashvili.
The trend-quality indicator (or Q-indicator) is a trend detection and estimation tool that is based on a two-step filtering technique. It measures cumulative price changes over term-oriented semicycles and relates them to ‘noise.’ The approach reveals congestion and trending periods of the price movement and focuses on the most important trends, evaluating their strength in the process. The indicator is presented in a centered oscillator and banded oscillator format.

Both Q-Indicator (the Trend Quality one) and the B-Indicator (trend-noise Balance Indicator) can be displayed (alternatively).

Different crossover signals can be easily added by just adding the required string in ParamList (the string SHALL follows the convention ?MA m1,m2 where ?MA is the MA type (EMA, SMA or WMA) and m1,m2 are the period ALWAYS in 2 digits (i.e. 5 shall be written as 05)

Q-indicator has 3 levels: 2(+/-) and 5(+/-): 0 to 2 means weak or NO trend; 2 to 5 means moderate trend, >= 5 means strong trend (Up trend if positive, Down trend if negative).

B-Indicator fluctuates between 0 to 100. It is better suited to identifies overbought/oversold levels. It has 2 levels: 65 and 80. 0 to 65 means NO or weak trend, 65 to 80 means moderate trend and >= 80 means strong trend.

I like this indicator since it is quite “agnostic” about the chosen parameters (Obviously the crossover MAs do matter !!).

Here is a screenshot of how the indicator looks:



Trend Quality Indicators for Amibroker (AFL)

In "Trend-Quality Indicator" in this issue, David Sepiashvili presents an innovative trend-detection tool -- the trend-quality indicator -- that attempts to estimate the trend in relation to noise.

Calculations presented in the article can be easily reproduced using AmiBroker Formula Language. The only tricky part is a piecewise exponential moving average that restarts the calculations on every moving average crossover, but we managed to implement it in two lines of code, thanks to AmiBroker's powerful Ama2 function, which allows easy implementation of all kinds of single-order infinite impulse response filters.

Listing 1 shows ready-to-use indicator code to plot the Q-indicator. In AmiBroker, select Indicator Builder from the Analysis menu, click the "Add" button, enter the formula, and then press "Apply." Figure 3 shows a sample chart.


// Piecewise EMA is an EMA that restarts calculations each time
// the 'sincebar' argument is true
function PiecewiseEMA( array, range, sincebar )
{
factor = IIf( sincebar, 1, 2/(range+1) );
return AMA2( array, factor, 1-factor );
}
// parameters
m=4;
n=250;
// generate reversal signals based on EMA crossover rule
Lpf1 = EMA( C, 7 );
Lpf2 = EMA( C, 15 );
CrossPoint = Cross( Lpf1, Lpf2 ) OR Cross( Lpf2, Lpf1 );
Periods = BarsSince( CrossPoint );
// variable bar sum
DC = Close - Ref( Close, -1 );
CPC = Sum( DC, Periods );
// smooth CPC by piecewise 4 bar EMA
Trend = PiecewiseEMA( CPC, 4, CrossPoint );
// noise
DT = CPC - Trend;
Noise = 2 * sqrt( MA( DT^2, n ) );
// alternative 'linear' noise calculation
// Noise = 2 * MA( abs( DT ), n ) );
QIndicator = Trend/Noise;
Plot(sign(Lpf1-Lpf2), "Rev", colorRed );
Plot( Qindicator, "Qindicator", colorGreen, styleHistogram);
PlotGrid( -1 );
PlotGrid( 1 );
PlotGrid( 2 );
PlotGrid( -2 );
PlotGrid( 5 );
PlotGrid( 5);

16 September 2011

Against all odds. Written by Thierry HUITEL. Based on Jim Varney’s work—
CANDLESTOCHASTICS— , and all the amibroker group :-).This Exploration is a
scan for 24 different buy or sell signals that selects days when several
bullish or bearish indicators are triggered at the same time.

Against all odds (draft). Written by Thierry HUITEL o-l—-}
based on Jim Varney’s work— CANDLESTOCHASTICS—
and all the amibroker group :-)

This Exploration is a scan for 24 different buy or sell signals.
The odds are 1 of 6 to get a TWO with a dice. If you try 1000 times, the odds are more than 99%.
The aim of the exploration is to find days when many bullish or bearish signs are triggered at the same time. If 5 indicators give a buy advice, it is more reliable than one.
I invite everybody to add your own systems to these ones, to improve the reliability. And experimented technical analysts could give advices to avoid the trap of using several different indicators all working off the same input data.

Vol Index: this column is the ratio of today’s volume to the 14-day average volume.
This column should be sorted Descending. The best signals are occur when VolIndex is at least 2 or higher.

PCL[up]: Piercing Line, “up” signifies Bullish.
MDS[up]: Morning Doji Star
BLE[up]: Bullish Engulfing
HAM[up]: Hammer
BRE[dn]: Bearish Engulfing, “dn” signifies Bearish.
DCC[dn]: Dark Cloud Cover
EDS[dn]: Evening Doji Star
TDREI[up] & [dn]: Tom DeMark’s Range Expansion Index
KUP[up] & [dn]: Keltner Bands -DIMITRIS TSOKAKIS
RSI[up] & [dn]: Relative Strength Index 14 periods
MFI[up] & [dn]: Money Flow Index
ST2[up] & [dn]: Stochastic Slow – Donald Dalley
DIV[up] & [dn]: % R divergence -DIMITRIS TSOKAKIS
KST[up] & [dn]: MARTIN PRING’S KST MOMENTUM SYSTEM -TJ
COP[up]: Coppock Curve TJ
SMH[up] & [dn]: smash day pattern. DIMA
CHK[up] & [dn]: Chaikin Money Flow. Thierry Huitel

A “1” in the column signifies TRUE, a “0” indicates no signal.

10 September 2011

SVE Inverse Fisher RSI for Amibroker (AFL)

An excellent indicator for short term signals. Buy when RSI crosses above 50 and sell below 50. Simple…….. Be careful higher values are not overbought and lower values are not oversold.




AFL


_SECTION_BEGIN("SVE Inv Fisher RSI");

RSIPer = Param("RSI Period", 4, 2, 30 );
EMAper = Param("EMA Period", 4, 1, 100 );

mwiter = C;
RainbW = 0;
for( i = 0; i < 10; i++ ) { weight = Max( 5 - i, 1 ); mwiter = WMA( mwiter, 2 ); RainbW += weight * mwiter; } RainbW /= 20; x = 0.1 * ( RSIa( RainbW, RSIper ) - 50 ); EMA1 = EMA( x, EMAPer ); EMA2 = EMA( EMA1, EMAPer ); Difference = EMA1 - EMA2; Z1Ema = EMA1 + Difference; ex = exp( 2 * Z1EMA ); y = ( ex - 1 )/( ex + 1 ); invfish = 50 * ( y + 1 ); Plot( invfish, "SVE Inverse Fisher RSI", colorBlue ); PlotOHLC( invfish,invfish,50,invfish, "", IIf(invfish > 50, colorGreen,colorRed ),
styleNoLabel | styleCloud | styleClipMinMax, 12, 88 );
_SECTION_END();

08 September 2011

Cannot open local drive C and D directly

When I try to open my local drive C: it will not open directly, a dialog box will appear and you will select what program you need to use to open the drive? what could be the problem? please help.


SOLUTIONS

I was lucky enuff to have this answer!!!!!
go to run

Type " regedit"

then find " ctrl+f"

in this box write "mountpoints2" and delete it ......

then again press "ctrl+f" again to find all mountpoints2 until ALL of these files are deleted
"there are a few of them!"

Prob solved!

27 August 2011

e-ratio

e-ratio: How to measure your trading edge in 4 easy steps

e-ratio is a metrics that measures the edge of a trading system component. For example, we could use it to quantify the edge gained from a donchian channel breakout entry signal.
The concept

The e-ratio quantifies the edge by calculating the overall amount trades go in your favor versus the overall amount trades go against you. The higher value the value of the e-ratio, the more trades move in your favor – giving you a good indication of the edge measured.

Take all the trades generated by the entry signal.
Close each trade after a given duration of n days.
Calculate the e-ratio based on data from all trades (formula detailed in 4 steps below). This gives you the e-ratio for a trade duration of n days.
Repeat the operation for various values of n to chart the e-ratio curve as a function of the number n of days – as illustrated below:



The e-ratio of the entry criteria is plotted above. The higher the value of the e-ratio, the better the edge. In the instance above the 45-day e-ratio is 1.21 but drops to 1.07 for day 68.


Step 1: Record MAE and MFE for each trade

For each trade, measure the Maximum Favorable Excursion and the Maximum Adverse Excursion.
Maximum Excursions are the maximum amount the price goes against you (Adverse) or in your favor (Favorable) during the trade. MAE is calculated between the entry price and the lowest price during the trade. MFE is calculated between the entry price and the highest price during the trade. Note that both values are positive.
Step 2: Normalise MAE and MFE values

To be able to compute the e-ratio across different markets, the Excursion values should be normalised to a common denominator – such as a unit of volatility. The Average True Range is a good measure of volatility. In many systems it is also used to drive the position sizing, making it really relevant.
Divide all MAE and MFE values by the ATR calculated at the beginning of the trade. In this example we use the same period for the ATR and the Donchian Channel.
This gives you comparable values across all markets and conditions.
Step 3: Average MAE and MFE values across all trades

Simple maths here: just add all normalised MAE values calculated in step 2 and divide by the number of trades. Repeat the operation for the MFE values.
Step 4: Final division = e-ratio

Simply divide the average MFE by the average MAE to give you the e-ratio. The higher the number, the better, with any values above 1 implying a positive edge.
Analysis

Plotting the e-ratio across different durations allows you to check the edge offered by the signal and what timeframe works best for the signal parameters.

You can also combine e-ratios for different parts of a system to see how they impact each other.
Another component of a trading system could be a trade filter, for example, trade with the main trend:

Only buy when the moving average (at a higher timeframe) is rising and below the price.
Only sell when the moving average (at a higher timeframe) is declining and above the price


http://www.automated-trading-system.com/e-ratio-trading-edge/






//----------------------------------------------------------------------
// e-ratio code aggregated by Jez Liberty
// http://www.automated-trading-system.com
//
// The code is largely inspired from the ASX Gorilla blog
// http://theasxgorilla.blogspot.com/2007/07/how-to-compute-edge-ratio-in-amibroker.html
//
// implementation of the Edge Ratio, included below, involves two profound Amibroker fudges.
// The first is the use of the AddToComposite function to create a composite ticker symbol
// in which to hold the ATR array of a given stock for later retrieval within the Custom Back Tester
// via the Foreign function.
// The second fudge is the use of the VarSet/VarGet function to create a quasi array.
// This was necessary to overcome the limitation where array elements cannot exceed in number the value of barcount-1.
//----------------------------------------------------------------------


//---------------------------------------------------------------------------------------------------------
// Options default reset (taken from boilerplate.afl on AmibrokerU.com
// Should be included on all code files
//---------------------------------------------------------------------------------------------------------

SetOption("InitialEquity",1000);
SetOption("MinShares", .0001);
SetOption("MinPosValue",0);
SetOption("FuturesMode", False);
SetOption("AllowPositionShrinking", True);
SetOption("ActivateStopsImmediately",False);
SetOption("ReverseSignalForcesExit", True);
SetOption("AllowSameBarExit",True);
SetOption("CommissionMode", 2);
SetOption("CommissionAmount", 0);
SetOption("InterestRate", 0);
SetOption("MarginRequirement", 100);
SetOption("PortfolioReportMode",0);
SetOption("MaxOpenPositions", 1);
SetOption("WorstRankHeld", 1);// Not in settings
SetOption("PriceBoundChecking",False);// Not in settings
SetOption("UsePrevBarEquityForPosSizing",True);
SetOption("UseCustomBacktestProc",False);

SetOption("DisableRuinStop",False);// Not in settings
SetOption("EveryBarNullCheck",False);// Not in settings

SetOption("HoldMinBars",0);// Not in settings
SetOption("HoldMinDays",0);// Not in settings
SetOption("EarlyExitBars",0);// Not in settings
SetOption("EarlyExitDays",0);// Not in settings
SetOption("EarlyExitFee",0);// Not in settings

SetOption("SeparateLongShortRank",False);// Not in settings
SetOption("MaxOpenLong",0);// Not in settings
SetOption("MaxOpenShort",0);// Not in settings

MaxPos= 100 * 100 / GetOption("MarginRequirement");
PositionSize = -MaxPos / GetOption("MaxOpenPositions");

RoundLotSize = 1; // 0 for Funds, 100 for Stocks
TickSize= 0; // 0 for no min. size
MarginDeposit = 10;
PointValue= 1;// For futures

ExitAtTradePrice = 0;
ExitAtStop= 1;
ExitNextBar= 2;

ReEntryDelay= 0;

//---------------------------------------------------------------------------------------------------------
// End of options reset - override options below
//---------------------------------------------------------------------------------------------------------

//Override of options to enable e-ratio calc and multiple simultaneous positions
PosQty = 5; // You can define here how many open positions you want
SetOption("MaxOpenPositions", PosQty );
PositionSize = -100/PosQty; // invest 100% of portfolio equity divided by max. position count
SetOption("InitialEquity",10000000);
SetOption("FuturesMode", True);

//-------------------------------------------------------------------------------
//Actual System/Signal tested goes below:
//-------------------------------------------------------------------------------

//BUY RULES: implemented with a Buy Stop based Upper Donchian Channel(20)
BuyStop = Ref(HHV(High, 20),-1);
Buy = Cross( High, BuyStop );
BuyPrice = Max( BuyStop, Low ); // make sure buy price not less than Low

//------------------------------------------------------------------------------
//e-ratio specific code
//------------------------------------------------------------------------------
//eratio is the variable that we "optimise" (step from 1 to 100)
eratio = Optimize("Eratio", 20, 1, 100, 1);

//Never Sell so that the position is stopped out after N bar instead
Sell = 3 > 5;
//Stop the positon and close it after N bars (eratio = N that we step from 1 to 100 in optimisation)
ApplyStop( stopTypeNBar, stopModeBars, eratio );

//AddToComposite function is used to create a composite ticker symbol.
//In it we hold the ATR array of a given instrument
//This is for later retrieval within the Custom Back Tester via the Foreign function
Normaliser = ATR(20);
AddToComposite(Normaliser, "~atr_"+Name(), "C", 1+2+8);

SetCustomBacktestProc(""); //activate the custom backtester
if(Status("action") == actionPortfolio) //called when backtesting/optimising
{
bo = GetBacktesterObject();
bo.PreProcess(); // run default backtest procedure
TradeATR = NumTrades = ATRArr = 0; //init variables
for( bar=0; bar < BarCount-1; bar++) { bo.ProcessTradeSignals(bar); for ( sig=bo.GetFirstSignal(bar); sig; sig=bo.GetNextSignal(bar) ) { if (sig.isEntry()) { NumTrades++; ATRArr = Foreign("~atr_"+sig.Symbol, "C"); VarSet("TradeATR" + NumTrades, ATRArr[bar]); _TRACE("Symbol " + sig.Symbol + " ATR: " + VarGet("TradeATR" + NumTrades)); } } } AvgMAE = AccumMAE = AvgMFE = AccumMFE = NumTrades = 0; // iterate through closed trades for( trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() ) { NumTrades++; EntryATR = VarGet ("TradeATR" + NumTrades); if ( EntryATR != 0 ) { _TRACE("EntryATR: " + WriteVal(EntryATR)); _TRACE("AccumMAE : " + WriteVal(AccumMAE)); AccumMAE = AccumMAE + (trade.GetMAE()*trade.EntryPrice/(100*EntryATR)); AccumMFE = AccumMFE + (trade.GetMFE()*trade.EntryPrice/(100*EntryATR)); } trade.AddCustomMetric("My MAE", trade.GetMAE()*trade.EntryPrice/100); trade.AddCustomMetric("My MFE", trade.GetMFE()*trade.EntryPrice/100); trade.AddCustomMetric("Entry ATR", EntryATR*10000); } AvgMAE = AccumMAE / NumTrades; AvgMFE = AccumMFE / NumTrades; _TRACE(WriteVal(AccumMAE )); _TRACE(WriteVal(NumTrades)); _TRACE(WriteVal(AvgMAE)); Eratio = abs(AvgMFE/AvgMAE); _TRACE(WriteVal(Eratio)); bo.AddCustomMetric( "Avg MAE", AvgMAE ); bo.AddCustomMetric( "Avg MFE", AvgMFE ); bo.AddCustomMetric( "Eratio", Eratio); bo.PostProcess(); } http://www.automated-trading-system.com/e-ratio-amibroker-code/

25 August 2011

Volume indi/ Oscillator for Amibroker

As volume levels are increasing, shorter-term volume moving averages will rise above longer-term volume moving averages. This is similar to how shorter-term price moving averages rise above longer-term price moving averages when prices are increasing. Thus, the difference between two volume moving averages of varying lengths (i.e., this indicator) can be used to see if overall volume trends are increasing or decreasing. When the Volume Oscillator rises above zero, it signifies that the shorter-term volume moving average has risen above the longer-term volume moving average, or that the short-term volume trend is higher (i.e., more volume) than the longer-term volume trend.

There are many ways to interpret changes in volume trends. One common belief is that rising prices coupled with increased volume, and falling prices coupled with decreased volume, is bullish. Conversely, if volume increases when prices fall, and volume decreases when prices rise, the market is showing signs of underlying weakness. The theory behind this is straight forward. Rising prices coupled with increased volume signifies increased upside participation (more buyers) that should lead to a continued move. Conversely, falling prices coupled with increased volume (more sellers signifies increased downside participation).

The above information is borrowed from the Metastock help files.

Place this indicator on the same chart as the DMI spread, Demand Index, and Cyclotron indicators. These provide some interesting supporting signals. Of couse, always have a price line somewhere.


http://www.wisestocktrader.com/indicators/123-volume-oscillator.txt





Time Segmented Volume for Amibroker (AFL)
TJ has helped me translate the metastock formula of TSV into AB language.

I thought I should share this formulas with other. This indicator uses volume and price, like OBV, but seems to be more reliable indicator then OBV.

In courtesy of The Wordens brothers I like to post the link for study on purpose and usage of this indicator. http://www.tc2000.com/privuser2/ii12118p.htm

By ntk98 – ntk98_2000 [at] yahoo.co.uk


// Time segment value

TSV=(Sum( IIf( C > Ref(C,-1), V * ( C-Ref(C,-1) ),
IIf( C < Ref(C,-1),-V * ( C-Ref(C,-1) ), 0 ) ) ,18)); Plot(TSV,"TSV",1,1); Stochastic %K & Volume for Amibroker (AFL) Quick solution to find Overbrought / Oversold Levels http://www.wisestocktrader.com/indicators/194-stochastic-k-volume


Pivots And Prices And Swing Volume for Amibroker (AFL)



Cumulate the volume for each swing

by Reinsley

Following the S&C "Price+Volume=Price movement by Tom ORD S&C’s document which is stored in Yahoo! Group files and posted in user’s list

Mod of Pivots And Prices formula




http://www.wisestocktrader.com/indicators/686-pivots-and-prices-and-swing-volume




Volume Analysis Studies for Amibroker (AFL)


This code studies price/volume based on information from

Master the Markets,
http://www.traderji.com/
http://www.traderslaboratory.com/


http://www.wisestocktrader.com/indicators/678-volume-analysis-studies



http://www.wisestocktrader.com/indicators/534-obtr-histogram




http://www.wisestocktrader.com/indicators/482-modified-volume-price-trend-indicator


http://www.wisestocktrader.com/indicators/472-klinger-volume-oscillator



http://www.wisestocktrader.com/indicators/1277-volume-delivery


http://www.wisestocktrader.com/indicators/1157-volume-price-analysis-v2


http://www.wisestocktrader.com/indicators/468-trendchart-v2-0-by-rmike



The Three Day Reversal Exploration for Amibroker (AFL)

The three day reversal is a very simple pattern. When the trend is Up or Long; The Three Day Drop and When the trend is Down or Short; The 3 Day Rise.

By Prashanth – prash454 [at] Rediffmail.com



http://www.wisestocktrader.com/indicators/187-the-three-day-reversal-exploration


Explo Vol Break out scan

http://www.wisestocktrader.com/indicators/786-exploration-formula-for-intraday


http://www.wisestocktrader.com/indicators/931-intraday-trend-break-system


http://www.wisestocktrader.com/indicators/1128-exploration-monthly-percent-change-table




http://www.wisestocktrader.com/indicators/1091-volume-spike-exploration


http://www.wisestocktrader.com/indicators/1415-volume-breakout-short.txt



BETTER VOLUME

http://emini-watch.com/free-stuff/volume-indicator/


Volume Spiker by Southwind for Amibroker (AFL)


This a very useful formula to detect volume breakout. As we know volume is a important thing to make a decision in trading. So with use this formula we can easily to find a volume breakout..


http://www.wisestocktrader.com/indicators/276-volume-spiker-by-southwind.txt

http://www.wisestocktrader.com/indicators/264-market-profile-with-volume-and-camarilla-pivots

http://www.wisestocktrader.com/indicators/453-strength-weakness.txt



Volume - compared with Moving Avg (100%) for Amibroker (AFL)

This is principle only another view of the volume. It shows you the difference from the current volume to the moving Volume in percent. I like it, because it is easier to analyze. you dont need to compare the volume with the moving, which has everyday another value. In this formula you see, for example, that sometimes the volume is 300% higher than the AVG. This makes it also easier to use in the exploration.

Set the scale to percent and automatic

//written by Thomas Zmuck
//Date: 15-07-02
//thomas.zm@aon.at

pds = 10;
V1 = V/MA(V,10); V2 = V/MA(V,20);
V3 = V/MA(V,50);

barcolor = IIf(V1 AND V2>1 AND V3>1;

Filter = unsure;
AddColumn(100*V/MA(V,10),"V/ma(V,10)",1.0);
AddColumn(100*V/MA(V,20),"V/ma(V,20)",1.0);
AddColumn(100*V/MA(V,50),"V/ma(V,50)",1.0);
AddColumn(ROC(C,1),"%today");

21 August 2011

Afl links

http://www.wisestocktrader.com/indicators/2023-auto-target

Z SCORE INDICATOR COLOR CODED TO IDENTIFY EASILY OVER BOUGHT AND OVER SOLD..


_SECTION_BEGIN("ZSCORE");
periods = 20;
ZScore = ( Close - MA( Close, periods ) ) / StDev( Close, periods );
color = IIf( ZSCORE >=3.0, ColorRGB(255,0,0),IIf( ZSCORE >=2.75, ColorRGB(0,255,0),IIf( ZSCORE >=2.5, ColorRGB(0,0,255),
IIf( ZSCORE >=2.25, ColorRGB(240,200,13),IIf( ZSCORE >=2,ColorRGB(255,22,160),IIf( ZSCORE >=0,ColorRGB(126,126,184),

IIf( ZSCORE <=-3.0, ColorRGB(255,0,0),IIf( ZSCORE <=-2.75, ColorRGB(0,255,0),IIf( ZSCORE <=-2.5, ColorRGB(0,0,255), IIf( ZSCORE <=-2.25, ColorRGB(240,200,13),IIf( ZSCORE <=-2,ColorRGB(255,22,160),ColorRGB(126,126,184)))))))))))); Plot( ZScore, "ZScore",color, ParamStyle("Style",styleHistogram |styleThick|styleNoTitle ,maskAll) ); Plot(2, "2", colorBlueGrey,4096); Plot(0, "0", colorBlueGrey,4096 ); Plot(-2, "-2", colorBlueGrey,4096); _SECTION_END(); Auto Target for Amibroker (AFL) I like to plot auto-target and see how far a price possibly up or down. You can set your own target. Pick the lowest and the highest of a trend, and this indicator will autocalculate the target. Enjoy. _SECTION_BEGIN("Auto Target Levels"); GraphXSpace=1; Plot(C,"", colorWhite,styleCandle); // Get values for target levels StartBar=SelectedValue(BarIndex()); FinishBar = EndValue( BarIndex() ); i = startbar; period = FinishBar - StartBar; Lo =LLV(L,period); Hi = HHV(H,period); Line0 = 0; Line1 = 0; //Target resisten 1 Line2 = 0; //Target resisten 2 Line3 = 0; //Target resisten 3 Line4 = 0; //Target support 1 Line5 = 0; //Target support 2 Line6 = 0; // Target support 3 Line100 = 0; for( i = startbar; i < finishbar; i++ ) { if(EndValue(C) Ref(C, -1);
DnTick = C < Ref(C, -1); SelBI = SelectedValue(BarIndex()) ; TotUpTick = 0; for(i = SelBI; i < BarCount; i++) { TotUpTick = TotUpTick + UpTick[i]; } ConsecCZ10UP = BarsSince(C <= Ref(C,-1)); ConsecCZ10Dn = BarsSince(C >= Ref(C,-1));
updncz10=(Conseccz10up-Conseccz10dn);
Plot(1,"",colorBlueGrey,styleLine|styleNoLabel|styleNoTitle);
Plot(0,"",ColorRGB(150,150,150),styleDashed|styleLine|styleNoLabel|styleNoTitle);
Plot(-1,"",colorBlueGrey,styleLine|styleNoLabel|styleNoTitle);

Plot(updncz10,"UptickDntick",IIf(updncz10>0,colorBlue,colorRed),styleHistogram|styleThick);
PlotOHLC(1,1,-1,-1,"",ColorRGB(20,20,25),styleCloud|styleNoLabel|styleNoTitle,Null,Null,0,-5);


Price Sup Res



_SECTION_BEGIN("Resistance");

HaClose =EMA((O+H+L+C)/4,3);
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
Temp = Max(High, HaOpen);
Temp = Min(Low,HaOpen);

supres=ParamToggle("Sup_Res","No|Yes",1);
if(supres)
{


Prd1=Param("Res_Period1",2,0,200,1);

test = TEMA ( High , Prd1 ) ;

PK = test > Ref(test,-1) AND Ref(test,1) < High;//Peak PKV0 = ValueWhen(PK,haHigh,0);//PeakValue0 PKV1 = ValueWhen(PK,haHigh,1);//PeakValue1 PKV2 = ValueWhen(PK,haHigh,2);//PeakValue2 MPK = PKV2 < PKV1 AND PKV1 > PKV0 ;//MajorPeak

MPKV = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, PKV1,1); //MajorPeakValue
MPKD = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, DateNum(),1); //MajorPeakDate
SD = IIf(DateNum() < LastValue(MPKD,lastmode = True ), Null, LastValue(MPKV,Lastmode = True));//SelectedDate Plot(SD, "Resist1", colorGreen,ParamStyle("ResStyle1",styleLine|styleNoTitle,maskAll)); MPKV2 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, PKV1,2); //MajorPeakValue MPKD2 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, DateNum(),2); //MajorPeakDate SD2 = IIf(DateNum() < LastValue(MPKD2,lastmode = True ), Null, LastValue(MPKV2,Lastmode = True));//SelectedDate Plot(SD2, "Resist2", colorGreen,ParamStyle("ResStyle2",styleLine|styleNoTitle,maskAll)); MPKV3 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, PKV1,3); //MajorPeakValue MPKD3 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, DateNum(),3); //MajorPeakDate SD3 = IIf(DateNum() < LastValue(MPKD3,lastmode = True ), Null, LastValue(MPKV3,Lastmode = True));//SelectedDate Plot(SD3, "Resist3", colorGreen,ParamStyle("ResStyle3",styleLine|styleNoTitle,maskAll)); MPKV4 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, PKV1,4); //MajorPeakValue MPKD4 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, DateNum(),4); //MajorPeakDate SD4 = IIf(DateNum() < LastValue(MPKD4,lastmode = True ), Null, LastValue(MPKV4,Lastmode = True));//SelectedDate Plot(SD4, "Resist4", colorGreen,ParamStyle("ResStyle4",styleLine|styleNoTitle,maskAll)); MPKV5 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, PKV1,5); //MajorPeakValue MPKD5 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, DateNum(),5); //MajorPeakDate SD5 = IIf(DateNum() < LastValue(MPKD5,lastmode = True ), Null, LastValue(MPKV5,Lastmode = True));//SelectedDate Plot(SD5, "Resist5", colorGreen,ParamStyle("ResStyle5",styleLine|styleNoTitle,maskAll)); MPKV6 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, PKV1,6); //MajorPeakValue MPKD6 = ValueWhen(Ref(MPK,-1) == 0 AND MPK == 1, DateNum(),6); //MajorPeakDate SD6 = IIf(DateNum() < LastValue(MPKD6,lastmode = True ), Null, LastValue(MPKV6,Lastmode = True));//SelectedDate Plot(SD6, "Resist6", colorGreen ,ParamStyle("ResStyle6",styleLine|styleNoTitle,maskAll)); _SECTION_END(); HaClose =EMA((O+H+L+C)/4,3); HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); Temp = Max(High, HaOpen); Temp = Min(Low,HaOpen); _SECTION_BEGIN("Support"); //SP=L > Ref(L,-1) AND Ref(L,1) < L;//Peak Prd2=Param("Sup_Period1",2,0,200,1); test2 = TEMA ( Low , Prd2 ) ; SP = Ref(test2,1) > Low AND test2 < Ref(test2,-1);//Peak SPV0 = ValueWhen(SP,haLow,0);//PeakValue0 SPV1 = ValueWhen(SP,haLow,1);//PeakValue1 SPV2 = ValueWhen(SP,haLow,2);//PeakValue2 //PKV5 = ValueWhen(PK,haHigh,5);//PeakValue5 //PKV6 = ValueWhen(PK,haHigh,6);//PeakValue6 MSP = SPV2 > SPV1 AND SPV1 < SPV0 ;//MajorPeak MSPV = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, SPV1,1); MSPD = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, DateNum(),1); SD = IIf(DateNum() < LastValue(MSPD,lastmode = True ), Null, LastValue(MSPV,Lastmode = True)); Plot(SD,"Support1", colorBrown,ParamStyle("SupportLine1",styleLine|styleNoTitle,maskAll)); MSPV2 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, SPV1,2); MSPD2 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, DateNum(),2); SD2 = IIf(DateNum() < LastValue(MSPD2,lastmode = True ), Null, LastValue(MSPV2,Lastmode = True)); Plot(SD2,"Support2", colorBrown,ParamStyle("SupportLine2",styleLine|styleNoTitle,maskAll)); MSPV3 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, SPV1,3); MSPD3 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, DateNum(),3); SD3 = IIf(DateNum() < LastValue(MSPD3,lastmode = True ), Null, LastValue(MSPV3,Lastmode = True)); Plot(SD3,"Support3", colorBrown,ParamStyle("SupportLine3",styleLine|styleNoTitle,maskAll)); MSPV4 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, SPV1,4); MSPD4 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, DateNum(),4); SD4 = IIf(DateNum() < LastValue(MSPD4,lastmode = True ), Null, LastValue(MSPV4,Lastmode = True)); Plot(SD4,"Support4", colorBrown,ParamStyle("SupportLine4",styleLine|styleNoTitle,maskAll)); MSPV5 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, SPV1,5); MSPD5 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, DateNum(),5); SD5 = IIf(DateNum() < LastValue(MSPD5,lastmode = True ), Null, LastValue(MSPV5,Lastmode = True)); Plot(SD5,"Support5", colorBrown,ParamStyle("SupportLine5",styleLine|styleNoTitle,maskAll)); MSPV6 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, SPV1,6); MSPD6 = ValueWhen(Ref(MSP,-1) == 0 AND MSP == 1, DateNum(),6); SD6 = IIf(DateNum() < LastValue(MSPD6,lastmode = True ), Null, LastValue(MSPV6,Lastmode = True)); Plot(SD6,"Support6", colorBrown,ParamStyle("SupportLine6",styleLine|stylehidden|styleNoTitle,maskAll)); } _SECTION_BEGIN("Price"); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 10 % return by 15 day uptrend exploration for Amibroker (AFL) This is very simple formula for finding up trending stocks. Here one can take entry in a stock when It crosses 15 day sma and trades above it for at least 13 days. After taking entry on 13 days hold it for 1 to 1.5 week and will get 10% return here use upper bollinger band as exit and 15 day sma as stoploss. _SECTION_BEGIN("seasionality"); // Define label bar (x) position location #pragma nocache blankRightBars = 5; //insert actual blank right bars specified in Preferences barsInView = Status("lastvisiblebarindex") - Status("firstvisiblebarindex") - blankRightBars; Offset = Param("Offset Bar", 0.95, 0, 1, 0.01); textOffset = BarCount - (Offset * barsInView); TimeFrameSet( inDaily) ; HaClose =EMA((O+H+L+C)/4,3); HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); X=Haopen Haclose, colorRed, IIf( X,7,14));
Plot(20,"", Color,styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 21,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
PlotText("DAILY TREND", textoffset, 81.05, colorWhite);
CondB=Haopen > Haclose;CONDS=Haopen < Haclose; event1=condS; PlotShapes( IIf(event1 ,shapeDigit1,0) ,5, 0,81.0); event2=CondB; PlotShapes( IIf(event2 ,shapeDigit1,0) , 4, 0,81.0); TimeFrameRestore(); TimeFrameSet( inWeekly) ; HaClose =EMA((O+H+L+C)/4,3); HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); X=HaOpen Haclose, colorRed, IIf( X,7,14));
Plot(40,"", Color, styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 41,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
PlotText(" WEEKLY TREND", textoffset, 81.20, colorWhite);
CondB1=Haopen > Haclose;CONDS1=Haopen < Haclose; event3=condS1; PlotShapes( IIf(event3 ,shapeDigit2,0) ,5, 0,81.20); event4=CondB1; PlotShapes( IIf(event4 ,shapeDigit2,0) , 4, 0,81.2); TimeFrameRestore(); TimeFrameSet( 10*inDaily) ; HaClose =EMA((O+H+L+C)/4,3); HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); X=Haopen Haclose, colorRed, IIf( X,7,14));
Plot(60,"", Color2, styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 61,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
PlotText("2 WEEK TREND", textoffset, 81.40, colorWhite);
CondB2=Haopen > Haclose;CONDS2=Haopen < Haclose; event4=condS2; PlotShapes( IIf(event4 ,shapeDigit3,0) ,5, 0,81.40); event5=CondB2; PlotShapes( IIf(event5 ,shapeDigit3,0) , 4, 0,81.4); TimeFrameRestore(); TimeFrameSet(20*inDaily) ; HaClose =EMA((O+H+L+C)/4,3); HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); X=Haopen Haclose, colorRed, IIf( X,7,14));
Plot(80,"", Color4, styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 81,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
PlotText("MONTHLY TREND", textoffset, 81.55, colorWhite);
CondB3=Haopen > Haclose;CONDS3=Haopen < Haclose; event6=condS3; PlotShapes( IIf(event6 ,shapeDigit4,0) ,5, 0,81.65); event7=CondB3; PlotShapes( IIf(event7 ,shapeDigit4,0) , 4, 0,81.65); TimeFrameRestore(); Sell=CondB AND CondB1 AND CondB2 OR Condb3; Buy= CondS AND CondS1 AND CondS2 OR Conds3; //Cover= Cond1 AND Cond2 OR Cond2 AND Cond3 OR Cond1 AND Cond3 ; //Sell= Cond4 AND Cond5 OR Cond5 AND Cond6 OR Cond4 AND Cond6; Buy=ExRem (Buy,Sell);Sell=ExRem(Sell,Buy); PlotShapes(shapeCircle*Buy, colorGreen,0,81.85); PlotShapes(shapeCircle*Sell, colorRed,0,81.85); GraphXSpace = 15; //...................................... _SECTION_END(); _SECTION_END(); If stocks continue to trade above 15 day sma ones you get 10% return then second entry possible on 21 day. Seasionality for Amibroker (AFL) I have collect it from my friend. It can identify monthly, weekly and daily trend. _SECTION_BEGIN("seasionality"); // Define label bar (x) position location #pragma nocache blankRightBars = 5; //insert actual blank right bars specified in Preferences barsInView = Status("lastvisiblebarindex") - Status("firstvisiblebarindex") - blankRightBars; Offset = Param("Offset Bar", 0.95, 0, 1, 0.01); textOffset = BarCount - (Offset * barsInView); TimeFrameSet( inDaily) ; HaClose =EMA((O+H+L+C)/4,3); HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); X=Haopen Haclose, colorRed, IIf( X,7,14));
Plot(20,"", Color,styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 21,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
PlotText("DAILY TREND", textoffset, 81.05, colorWhite);
CondB=Haopen > Haclose;CONDS=Haopen < Haclose; event1=condS; PlotShapes( IIf(event1 ,shapeDigit1,0) ,5, 0,81.0); event2=CondB; PlotShapes( IIf(event2 ,shapeDigit1,0) , 4, 0,81.0); TimeFrameRestore(); TimeFrameSet( inWeekly) ; HaClose =EMA((O+H+L+C)/4,3); HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); X=HaOpen Haclose, colorRed, IIf( X,7,14));
Plot(40,"", Color, styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 41,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
PlotText(" WEEKLY TREND", textoffset, 81.20, colorWhite);
CondB1=Haopen > Haclose;CONDS1=Haopen < Haclose; event3=condS1; PlotShapes( IIf(event3 ,shapeDigit2,0) ,5, 0,81.20); event4=CondB1; PlotShapes( IIf(event4 ,shapeDigit2,0) , 4, 0,81.2); TimeFrameRestore(); TimeFrameSet( 10*inDaily) ; HaClose =EMA((O+H+L+C)/4,3); HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); X=Haopen Haclose, colorRed, IIf( X,7,14));
Plot(60,"", Color2, styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 61,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
PlotText("2 WEEK TREND", textoffset, 81.40, colorWhite);
CondB2=Haopen > Haclose;CONDS2=Haopen < Haclose; event4=condS2; PlotShapes( IIf(event4 ,shapeDigit3,0) ,5, 0,81.40); event5=CondB2; PlotShapes( IIf(event5 ,shapeDigit3,0) , 4, 0,81.4); TimeFrameRestore(); TimeFrameSet(20*inDaily) ; HaClose =EMA((O+H+L+C)/4,3); HaOpen = AMA( Ref( HaClose, -1 ), 0.5 ); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); X=Haopen Haclose, colorRed, IIf( X,7,14));
Plot(80,"", Color4, styleHistogram|styleOwnScale|styleNoLabel, 0, 100 );
Plot( 81,"",colorBlack,styleOwnScale|styleArea|styleNoLabel,0, 100 );
PlotText("MONTHLY TREND", textoffset, 81.55, colorWhite);
CondB3=Haopen > Haclose;CONDS3=Haopen < Haclose; event6=condS3; PlotShapes( IIf(event6 ,shapeDigit4,0) ,5, 0,81.65); event7=CondB3; PlotShapes( IIf(event7 ,shapeDigit4,0) , 4, 0,81.65); TimeFrameRestore(); Sell=CondB AND CondB1 AND CondB2 OR Condb3; Buy= CondS AND CondS1 AND CondS2 OR Conds3; //Cover= Cond1 AND Cond2 OR Cond2 AND Cond3 OR Cond1 AND Cond3 ; //Sell= Cond4 AND Cond5 OR Cond5 AND Cond6 OR Cond4 AND Cond6; Buy=ExRem (Buy,Sell);Sell=ExRem(Sell,Buy); PlotShapes(shapeCircle*Buy, colorGreen,0,81.85); PlotShapes(shapeCircle*Sell, colorRed,0,81.85); GraphXSpace = 15; //...................................... _SECTION_END(); _SECTION_END(); OBV in isolation may not make much sense intraday, All this simple but effective indicator does is to create the shadows of the OBV in the form of 9 WMA and 21 WMA and the crossover of the OBV and shadows tells you to go long or short.As they say “Coming events cast their shadows before” _SECTION_BEGIN("OBV"); Plot( OBV(), _DEFAULT_NAME(), IIf( C > O, ParamColor("Up Color", colorGreen ), ParamColor("Down Color", colorRed ) ), ParamStyle( "Style") );
SetChartBkGradientFill( ParamColor("BgTop",colorBlack),ParamColor("BgBottom",colorBlack),ParamColor("Titleblock",colorLightGrey));

_SECTION_END();

_SECTION_BEGIN("WMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();

_SECTION_BEGIN("OBV1");
Plot( OBV(), _DEFAULT_NAME(), IIf( C > O, ParamColor("Up Color", colorGreen ), ParamColor("Down Color", colorBlue ) ), ParamStyle( "Style") );
_SECTION_END();

Buy = Cross(OBV(),WMA(OBV(),9));
Sell = Cross(WMA(OBV(),9),OBV());

Short = Sell;
Cover = Buy;
PlotShapes(shapeUpArrow*Buy,colorGreen);

PlotShapes(shapeDownArrow*Sell,colorRed);


_SECTION_BEGIN("WMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( WMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();




Trade Entry with Bollinger Bands in down-market for Amibroker (AFL)


Bollinger bands are really fantastic in providing with a limiting value or a standard deviation of the price-hikes. It is also found that if two Bollinger Bands of different parameters are overlapped over one another than it gives a finer edge for the trade entry.

There are actually two Bollingers used in the formula, but only the bottom part is drawn as this formula depicts the entries in the down trend of the market only. It possibly can well be extended for the upmarket. If anyone can do that addition it’ll be appreciated to have it here too :)

I have tried to mimic that in the formula below. Please do feel free to change the formula or comment your findings and pitfalls or benefits of this indicator in your trade.

Enjoy the indicator.

Disclaimer: The author and the site do not guarantee any accuracy of this indicator as well as any loss or profit incurring from using it. Please use only for study and entertainment purpose.


SetFormulaName( "NMN Bollinger Entry" );
SetChartOptions( 1, chartShowDates | chartWrapTitle );

_SECTION_BEGIN( "Bollinger Parameters" );
P = ParamField( "Bollinger Band on", 3 );
Pd1 = Param( "BB 1 Period", 10, 3, 100, 1 );
W1 = Param( "BB 1 Width", 1.35, 0, 50, 0.01 );
Pd2 = Param( "BB 2 Period", 15, 3, 100, 1 );
W2 = Param( "BB 2 Width", 2, 0, 50, 0.01 );

Plot( P, "Price Chart", IIf( O < C, colorBrightGreen, colorRed ), styleCandle ); Plot( bb1 = BBandBot( P, Pd1, W1 ), "Inner/Top Bollinger", colorLightOrange, styleLine ); Plot( bb2 = BBandBot( P, Pd2, W2 ), "Outer/Btm Bollinger", colorLightGrey, styleLine ); _SECTION_END(); _SECTION_BEGIN( "Candle-Bollinger positions" ); DCT = Param( "Down Candle triggger", 1.5, 0.01, 10, 0.01 ); UCT = Param( "Up Candle triggger", 1.5, 0.01, 10, 0.01 ); DnCandle = ( O >= C );
UpCandle = NOT DnCandle; // ( O < C ) // Signals OpenAboveBB1 = O > bb1;
OpenBelowBB1 = O < bb1; CloseAboveBB1 = C > bb1;
CloseBelowBB1 = C < bb1; CloseBelowBB2 = C < bb2; CloseAboveBB2 = C > bb2;

OpenBelowBB2 = O < bb2; OpenAboveBB2 = O > bb2;

OpenBetweenBB = ( bb1 > O ) AND ( bb2 < O ); CloseBetweenBB = ( bb1 > C ) AND ( bb2 < C ); CandleBetweenBB = OpenBetweenBB AND CloseBetweenBB ; DnCandleAcrossBB = ( O > bb1 ) AND ( bb2 > C ) ;
UpCandleAcrossBB = ( C > bb1 ) AND ( bb2 > O ) ;

CandleBelowBB2 = OpenBelowBB2 AND CloseBelowBB2 ;

TotallyBelowBB1 = ( H < bb1 ) AND ( H > bb2 ) ; // without the 2nd condn. its same as 'TotallyBelowBB2'
TotallyBelowBB2 = ( H < bb2 ); TotallyBetweenBB = ( H < bb1 ) AND ( L > bb2 );

CandleBody = IIf( DnCandle, ( O - C ), ( C - O ) ); //CandleBody = IIf(CandleBody==0,0.000001,CandleBody);
FullCandle = ( H - L );
CandleWick = FullCandle - CandleBody;
TopWick = H - IIf( DnCandle, O, C ) ;
BtmWick = IIf( DnCandle, C, O ) - L ;

LastIsDnCandle = Ref( DnCandle, -1 );
LastIsUpCandle = Ref( UpCandle, -1 );

BBGap = ( bb1 - bb2 ); // Gap between the overlapping bollinger-bands

BB_Candle_ratio = BBGap / CandleBody ;
Candle_BB_ratio = CandleBody / BBGap ;
WickCandleRatio = CandleWick / CandleBody ;
CandleWickRatio = CandleBody / CandleWick ;
WickTopBtmRatio = TopWick / BtmWick ;

bb1topcut = IIf( DnCandle, ( O - bb1 ), ( C - bb1 ) );
bb2topcut = IIf( DnCandle, ( O - bb2 ), ( C - bb2 ) );

bb1cut = bb1topcut / CandleBody ;
CandleCutByBB1 = IIf( DnCandle, ( bb1 > C ) AND ( bb1 < O ), ( bb1 > O ) AND ( bb1 < C ) ) ; bb1cutHi = ( abs( bb1cut ) <= ( Param( "High cut by BB1 (in %)", 30, 1, 100, 1 ) / 100 ) ) AND CandleCutByBB1 ; bb1cutLo = ( abs( bb1cut ) >= ( Param( "Low cut by BB1 (in %)", 50, 1, 100, 1 ) / 100 ) ) AND CandleCutByBB1 ;

bb2cut = bb2topcut / CandleBody ;
CandleCutByBB2 = IIf( DnCandle, ( bb2 > C ) AND ( bb2 < O ), ( bb2 > O ) AND ( bb2 < C ) ); bb2cutHi = abs( bb2cut ) <= ( Param( "High cut by BB2 (in %)", 50, 1, 100, 1 ) / 100 ) AND CandleCutByBB2 ; bb2cutLo = abs( bb2cut ) >= ( Param( "Low cut by BB2 (in %)", 60, 1, 100, 1 ) / 100 ) AND CandleCutByBB2 ;

// Down candle 'buy' logic-parts
DnCandle_below_both_BB = DnCandle AND OpenBelowBB2 AND CloseBelowBB2 ;
DnCandle_above_both_BB = DnCandle AND CloseAboveBB1 AND OpenAboveBB1 ;
DnCandle_between_BB = DnCandle AND CandleBetweenBB ;
DnCandle_Across_BB = DnCandleAcrossBB AND ( CandleBody > ( BBGap * DCT ) ) ;
//DnCandleSpansBB = ( O > bb1 ) AND ( C < bb2 ) ; // Up Candle 'buy' logic-parts UpCandleBelowBothBB = UpCandle AND OpenBelowBB2 ; UpCandleAboveBothBB = UpCandle AND OpenAboveBB1 ; UpCandle_between_BB = UpCandle AND ( ( bb1 > C ) AND ( bb2 < C ) ) AND ( ( bb1 > O ) AND ( bb2 < O ) ); UpCandleBetweenBB = UpCandle AND ( bb1 > O ) AND ( bb2 < O ) AND ( bb2 > C );
UpCandle_Across_BB = UpCandleAcrossBB AND ( CandleBody > ( BBGap * UCT ) ) ;

/*--------------------------------------------
TRADE LOGICS
---------------------------------------------*/

Buy0 = ( DnCandle AND bb1cut < 0.7 AND bb1cut > 0.0 AND WickCandleRatio > 0.75 AND WickCandleRatio < 1.0 ) OR ( ( CandleBetweenBB OR CandleBelowBB2 ) AND ( CandleBody > 1 ) AND ( BBGap < 100 ) AND ( IIf( DnCandle, TopWick CandleBody * 2, TopWick > BtmWick AND TopWick > CandleBody * 2 ) ) ) OR
( UpCandle AND ( TopWick > BtmWick ) AND ( TopWick > CandleBody * 2 ) AND ( ( CandleCutByBB1 AND C > bb2 ) OR CandleBetweenBB OR CandleBelowBB2 ) ) OR
( UpCandle AND bb1cutHi AND bb2cutHi );

Buy1 = DnCandle AND bb1cutHi AND BBGap <= CandleBody ; Buy2 = OpenBelowBB1 AND DnCandle_Across_BB ; Buy3 = DnCandle_Across_BB AND ( ( bb1cut < .5 ) AND ( bb2cut > .5 ) ) ;
Buy4 = DnCandle AND bb2cutHi ;

Buy5 = TotallyBelowBB2 AND ( BBGap >= 30 ) AND GapDown();
Buy6 = ( TotallyBelowBB2 OR ( UpCandle AND CloseBelowBB2 ) ) AND ( BBGap <= CandleBody ); Buy7 = ( bb1cut < 0 AND bb2cut > 0 AND bb2cut <= 1.0 ) OR ( UpCandle_Across_BB AND bb2cut > 0.6 ) ;
Buy8 = DnCandle_below_both_BB AND ( ( BBGap <= CandleBody ) OR ( CandleBody == 0 ) ); Buy = Buy0 OR Buy1 OR Buy2 OR Buy3 OR Buy4 OR Buy5 OR Buy6 OR Buy7 OR Buy8; Sell = IIf( GroupID( 1 ) == "Z", Ref( Buy, -10 ), Ref( Buy, -3 ) );//( Ref( Buy, -10 ) AND (GroupID(1)== "Z") ) OR Ref( Buy, -3 ); // back log : 4 day maturity profit/loss : it is a requirement in BD-DSE market Clog = ( 100 * ( C - Ref( C, -3 ) ) / Ref( C, -3 ) ); MaturedSince = IIf( GroupID( 1 ) == "Z", Ref( C, -10 ), Ref( C, -3 ) ); sYield = IIf( Buy, C - HHV( O, 15 ), C - MaturedSince ); Ypercent = ( sYield / MaturedSince ) * 100 ; YpcStr = NumToStr( Ypercent, 12.2 ) + " %"; Yrate = Ypercent / IIf( GroupID( 1 ) == "Z", 11, 4 ); YrateStr = NumToStr( Yrate, 12.2 ) + " %" ; Strength = Buy0 + Buy1 + Buy2 + Buy3 + Buy4 + Buy5 + Buy6 + Buy7 + Buy8; // - Sell; Trade = WriteIf( Buy == True, "Buy", WriteIf( Sell == True, "Sell", "N" ) ); // [Indicator] shape0 = Buy0 * shapeUpTriangle ; shape1 = Buy1 * shapeSmallUpTriangle ; shape2 = Buy2 * shapeSmallUpTriangle ; shape3 = Buy3 * shapeSmallUpTriangle ; shape4 = Buy4 * shapeSmallUpTriangle ; shape5 = Buy5 * shapeSmallUpTriangle ; shape6 = Buy6 * shapeSmallUpTriangle ; shape7 = Buy7 * shapeSmallUpTriangle ; shape8 = Buy8 * shapeSmallUpTriangle ; sellshape = Sell * shapeDownArrow ; shape0color = colorViolet; shape1color = colorBrightGreen; shape2color = colorViolet; shape3color = colorGreen; shape4color = colorRed; shape5color = colorPink; shape6color = colorLavender; shape7color = colorAqua; shape8color = colorDarkRed; sellshapecolor = colorRose; BuySellLetter = IIf( Buy, colorDarkGreen, IIf( Sell, colorRed, colorDefault ) ); BuySellBG = IIf( Buy, colorPaleGreen, IIf( Sell, colorDarkRed, colorDefault ) ); /*------------------------------------------ Automatic Analysis -------------------------------------------*/ TransmitOrder = False; // Set to True to really trade! bi = BarIndex(); cid = ( SelectedValue( bi ) - bi[ 0 ] ); // candle identification Filter = ( Buy OR Sell ) ;//AND Status( "lastbarinrange" ) ; // chooses only the last bar i.e., day or period AASettings = Status( "action" ); if ( AASettings == actionIndicator ) { // [Indicator] PlotShapes( shape0, shape0color, 0, L, -42 ); PlotShapes( shape1, shape1color, 0, L, -12 ); PlotShapes( shape2, shape2color, 0, L, -16 ); PlotShapes( shape3, shape3color, 0, L, -20 ); PlotShapes( shape4, shape4color, 0, L, -24 ); PlotShapes( shape5, shape5color, 0, L, -28 ); PlotShapes( shape6, shape6color, 0, L, -32 ); PlotShapes( shape7, shape7color, 0, L, -34 ); PlotShapes( shape8, shape8color, 0, L, -38 ); PlotShapes( sellshape, sellshapecolor, 0, H, -24 ); } else if ( AASettings == actionCommentary ) { // [Commentary] printf( "Study of parameters.\n---------------------------\n" ); printf( "High @ = %g\n", H ) ; if ( DnCandle[cid] ) { printf( "Open @ = %g\n", O ) ; printf( "Close @ = %g (4dM %g)\n", C, sYield ) ; } else { printf( "Close @ = %g (4dM %g)\n", C, sYield ) ; printf( "Open @ = %g\n", O ) ; } printf( "Low @ = %g\n\n", L ) ; printf( "Volume = %g\n\n", V ) ; printf( "Body of the candle = %g\n", CandleBody ); printf( "Top Wick Size = %g\n", TopWick ); printf( "Bottom Wick Size = %g\n", BtmWick ); printf( "Wick Size = %g\n", CandleWick ); printf( "Full-candle Size = %g\n\n", FullCandle ); printf( "..........................\nCandle type = " + WriteIf( DnCandle, "Down / Red / Black\n\n", "Up / Green / White\n\n" ) ); printf( "Candle:wick ratio = 1 : %g\n", CandleWickRatio ); printf( "Wick:candle ratio = 1 : %g\n\n", WickCandleRatio ); printf( "TopWick:BtmWick ratio = 1 : %g\n\n", WickTopBtmRatio ); printf( "Gap between Bollingers = %g\n\n", BBGap ); printf( "Candle:BBGap ratio = 1 : %g\n", round( Candle_BB_ratio * 100 ) / 100 ); printf( "BBGap:Candle ratio = 1 : %g\n\n", round( BB_Candle_ratio * 100 ) / 100 ) ; printf( WriteIf( Candle_BB_ratio > 1.0, "The 'candle is larger' than the bollinger gap.\n", "" ) +
WriteIf( BB_Candle_ratio < 0, "Candle is away from the Bollinger-gap\n", "" ) + WriteIf( BB_Candle_ratio > 1.00, "The Bollinger gap is wide enough to hold the candle in.\n", "" ) +
WriteIf( CandleBetweenBB, "Candle is inside the bollinger band.\n", "" ) +
WriteIf( ( DnCandle AND OpenBelowBB2 ) OR ( UpCandle AND CloseBelowBB2 ), "The 'candle is outside' and 'below' the bollinger gap.\n", "" ) +
WriteIf( ( DnCandle AND CloseAboveBB1 ) OR ( UpCandle AND OpenAboveBB1 ), "The 'candle is outside' and 'above' the bollinger gap.\n", "" ) +
"..........................\n"
);

if ( DnCandle[cid] )
{
Commentary = "\nBlack / Red / Down Candle :\n~~~~~~~~~~~~~~~~~~" ;

if ( CloseAboveBB1[cid] )
Commentary += "\nCandle closed above Top bollinger." ;
else
if ( OpenBelowBB2[cid] )
Commentary += "\nCandle opens below Bottom Bollinger,\nthus a 'below bollinger candle'.";
else
if ( CloseBetweenBB[cid] AND OpenAboveBB1[cid] )
Commentary += "\nCandle is cut by the top bollinger\nand resides above bottom bollinger.";
else
if ( OpenBetweenBB[cid] AND CloseBelowBB2[cid] )
Commentary += "\nCandle is cut by the bottom bollinger\nand resides below top bollinger.";
else
if ( OpenAboveBB1[cid] AND CloseBelowBB2[cid] )
Commentary += "\nCandle cut by both bollingers.";
else
Commentary += "\nCandle is lying between the bollingers.";
}
else
{
Commentary = "\nWhite / Green / Up Candle :\n~~~~~~~~~~~~~~~~~~" ;

if ( OpenAboveBB1[cid] )
Commentary += "\nCandle started above Top bollinger." ;
else
if ( CloseBelowBB2[cid] )
Commentary += "\nCandle closed below Bottom Bollinger.";
else
if ( OpenBetweenBB[cid] AND CloseAboveBB1[cid] )
Commentary += "\nCandle is cut by the top bollinger\nand starts above bottom bollinger.";
else
if ( CloseBetweenBB[cid] AND OpenBelowBB2[cid] )
Commentary += "\nCandle is cut by the bottom bollinger\nand ends below top bollinger.";
else
if ( CloseAboveBB1[cid] AND OpenBelowBB2[cid] )
Commentary += "\nCandle cut by both bollingers.";
else
Commentary += "\nCandle is lying between the bollingers.";
}

if ( DnCandle_between_BB[cid] )
Commentary += "\nCandle enclosed inside the Bollingers!";
else
if ( DnCandleAcrossBB[cid] OR UpCandleAcrossBB[cid] )
Commentary += "\nCandle spans across the Bollingers.";

printf( "\nbb1cut = %g%% (O - bb1) = %g", /**/bb1cut , bb1topcut );/** /round( bb1cut*10000 ) / 100, bb1topcut );/**/

printf( "\nbb2cut = %g%% (O - bb2) = %g\n", /**/bb2cut, bb2topcut );/** /round( bb2cut*10000 ) / 100, bb2topcut );/**/

printf( Commentary + "\n\n" );
}
else
if ( AASettings == actionScan )
{
// Scan
}
else
if ( AASettings == actionExplore )
{
// Exploration
AddTextColumn( GroupID( 1 ), "Cat", formatChar, IIf( GroupID( 1 ) == "Z", colorWhite, colorDefault ), IIf( GroupID( 1 ) == "Z", colorRed, colorDefault ), 30 );

AddColumn( IIf( GroupID( 1 ) == "Z", Ref( C, -10 ), Ref( C, -3 ) ), "Start Price", 3.2, colorBlue, colorDefault, -1 );
AddColumn( C, "Close", 3.2, colorBlue, colorDefault, -1 );

AddColumn( V, "Total Vol.", 8 ) ;

AddColumn( Strength, "Strength", 1, colorRed, colorDefault, 40 );
// AddTextColumn( Trade, "Trade", 1, BuySellLetter, BuySellBG, -1 );
AddTextColumn( WriteIf( Buy, "Buy", "" ), "Buy", 1, BuySellLetter, IIf( Buy, colorPaleGreen, colorDefault ), -1 );
AddTextColumn( WriteIf( Sell, "Sell", "" ), "Sell", 1, BuySellLetter, IIf( Sell, colorDarkRed, colorDefault ), -1 );

AddColumn( sYield, "Avg.Yield", 1.2, IIf( Buy, colorLightGrey, IIf( sYield < 0, colorRed, colorGreen ) ), colorDefault, -1 );
AddTextColumn( YpcStr, "Yield %", 1, IIf( Buy, colorLightGrey, IIf( Ypercent < 0, colorRed, colorGreen ) ), colorDefault, -1 );
AddTextColumn( YrateStr, "Yield rate", 1, IIf( Buy, colorLightGrey, IIf( Yrate < 0, colorRed, colorGreen ) ), colorDefault, -1 );

AddColumn( round( ROC( Close, 4 )*100 ) / 100, "ROC(4)", 1.2, colorDefault, colorDefault, -1 );

}
else
if ( AASettings == actionBacktest )
{
// Backtest
}

_SECTION_END();

Title = "{{NAME}} - {{INTERVAL}} - {{DATE}} - {{VALUES}}" + "\n";

My Blog List

Total Pageviews

Search This Blog

Followers

Blog Archive