Threaded View
-
12-09-2012 08:03 AM #10
Member- Ngày tham gia
- Oct 2003
- Bài viết
- 365
- Được cám ơn 215 lần trong 148 bài gởi
Phân tích kỹ thuật - AmiBroker Code (tt)
Đây là loạt bài Amibroker Code về phần mềm phân tích kỹ thuật AmiBroker
ZigZag Strategy Suite for AmiBroker
The market Zigs and Zags, and this is a perennial source of fascination for traders. Does movement predict more movement? Should movement be faded? These are fundamental questions of tendency for any market and timeframe which can only be answered by testing.
CodeForTraders is pleased to offer the ZigZag Strategy Suite for AmiBroker as a low-cost, pre-written, powerful, well-organized place from which to begin (or extend) your AB journey.
What It Is
The ZigZag Strategy Suite for AmiBroker is 2 AFL formulas which together implement a collection of , visualization, presentation, and optimization techniques to create a complete solution for investigating ZigZag trading.
What It Looks Like
Observe the price bars with the overlayed ZigZag lines in the page below. In this example, the strategy has been configured to enter with the latest movement of at least 2% in either direction. (Calculations are retrospective for , not intended for real-time trading.)
Notice how the bars have been colored green during long trades and red during short trades (they will be white when no trades are in progress). Trade entry signal bars are indicated by the green and red arrows. All signals (buy, sell, short, cover) may be seen in the (optional) histogram display at the bottom of the price pane.
These pictures show the extensive set of parameters made available in the main formula (the one in the price pane), which is designed to provide easy control of both interactive visualization, and automatic optimization as desired.
Note the lines that start with "+++++++ ". These indicate blocks of functionality which may be switched on and off as desired for backtests and optimizations.
The lines that end with " ---------- " are individual parameters which may be set to either be optimized or "locked down" from right here in the Parameter Dialog.
Read on to learn about the many other features provided.
For insight into the flexibility and convenience of the ZigZag Suite, please view this video, which introduces the technology in use:
Video: ZZ Strategy Suite - Visual Introduction
What It Does
The ZigZag Strategy Suite Package uses AmiBroker Formula Language (AFL) to implement a long list of desirable features. Each section of code is clearly marked and commented.
Included you will find:
Code for adding custom metric(s)
Code for AA window display of non-optimized parameters
Code for optimizer choice and setup
Code for single contract testing
Code for trading on the Open of the next bar after a Signal.
Code for technical calculation(s).
Code for trading long-only, short-only, or in both directions
Code for trading signals in the opposite direction (fade the ZZ)
Code for a choice of trade signal filters
Code for limiting trading to an intraday time window
Code for optimizable StopLoss, ProfitTgt, and TrailingStop
Code for determining and displaying exit reason
Code for histogram visualization of buy/sell/short/cover arrays.
Code for passing NetPft to cooperating display indicator in another chart pane.
Code for Displaying signals as an Exploration
Code for on-chart plotting of price, signal arrows, and trade duration/direction bar coloring
Code for creating and displaying informative title text
Code for display of filters
These features are provided in the context of a Zig-Zag indicator-based trading model:
Trade with new legs of market movement
Trade against new legs of market movement
For optimization, there are 4 major numeric dimensions:
ZigZag_PctChg
StopLossPct
PftTgtPct
TrailingStopPct
along with various other useful switches and choices.
The code uses the ZigZag as the provided calculation and provides built-in display of the relevant pivot points and ZZ legs per your ZigZag_PctChg setting.
Innovations
This strategy has been specially designed to allow wide-scope or narrow-scope optimization to be configured directly from the AB Parameters Dialog. This means optimization across any desired combination of the major numeric dimensions based strictly on Dialog settings without requiring code edits.
Also, custom metrics are used to ensure that non-optimized (i.e. locked-down) major dimensions are displayed in the AmiBroker Automatic window optimization results. This ensures that the report more thoroughly reflects the configuration of parameters used to generate it (which is not normally true by default).
(Note how the "locked down" Mode, Filter, etc. parameters remain unchanging throughout the optimization, yet are still part of the final display. Without them, you wouldn't know everything important about what created the performance.)
For a visual explanation of the flexible optimization implementation, please see this video, originally prepared for the RSI Strategy Suite:
Video: RSI Strategy Suite - Flexible Optimization w/o Code Edits
You may choose to operate the code with any of the built-in AmiBroker non-exhaustive optimizers (CMAE, Tribes, SPSO). Again, no code edits required for this!
The goal of this code is to advance the new user past months of study and experimentation directly to feature-rich, working code that is both
immediately useful as-is
easily repurposed and extended
Are you a sophisticated AB user/programmer who has already written similar capabilities for yourself?
If not, CFT believes our ZigZag Strategy Suite is the most feature-rich, flexible, and easy-to-use code for the study of ZigZags available anywhere.
What You Get
The primary ZigZag-based trading formula for backtesting/optimization/display
Cooperating Net-Profit formula for separate pane display
A .chart file for creating the window as shown above
Customer Support for initial installation.
This package is distributed as fully-disclosed AFL. You will be able to modify and extend it as desired, but you may not share it with non-licensees (just send them here instead!).
-
Những thành viên sau đã cám ơn :
tradingpro8x (12-08-2013)
Thông tin của chủ đề
Users Browsing this Thread
Có 1 thành viên đang xem chủ đề này. (0 thành viên và 1 khách vãng lai)
Similar Threads
-
Một bài phân tích hay, có lý và khách quan
By Brainstorm in forum Thảo luận Tình hìnhTrả lời: 0Bài viết cuối: 17-06-2012, 11:41 PM -
Phần mềm phân tích kỹ thuật
By waterloo1815 in forum CLB Chứng khoánTrả lời: 2Bài viết cuối: 28-10-2009, 11:32 PM
Bookmarks