SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
ApplyStop Intro 1/2
AMIBROKER QUANT COURSE
73
When to sell?
1. Sell Signals
• Sell = sellConMKC AND (sellCon1 AND sellCon2 …);
2. Stop Triggers
• ApplyStop( stopTypeLoss, stopModePercent, 15);
3. Better opportunities
• Calculate current positions
• Calculate opportunities, and then compare to current positions
• Force sell signals, and then enter a better opportunity
Note: use CBI to perform 3.
74
Facts about Stop Triggers
•Stops can help or hurt your results
•Change of degree in stop could result favorably or unfavorably
•Limitation in AmiBroker
•Backtesting VS Execution
•Keep it manageable and executable; otherwise, don’t use it
75
Basic ApplyStop in AmiBroker
76
ApplyStop( Type, Mode, Amount);
• stopTypeLoss
• stopTypeProfit
• stopTypeNBar
• stopTypeTrailing
• stopModePoint
• stopModePercent
• stopModeBars
• stopModeRisk
• Number: 15
• Point
• Percent
• Bars
• Array: 3ATR(14)
77
40 days
100
100
120
Profit from High = 120 – 100 = 20, then 10% profit = 2
118
100
120
High at 120, 10% = 12
High at 110, 10% = 11
108
99
-10%
100
90
10%
100
110
ApplyStop(stopTypeLoss,
stopModePercent, 10);
ApplyStop(stopTypeProfit,
stopModePercent, 10);
ApplyStop(stopTypeNBar,
stopModeBars, 40);
ApplyStop(stopTypeTrailing,
stopModePercent, 10);
ApplyStop(stopTypeTrailing,
stopModeRisk, 10);
EASY ?
Not so fast !
78
More Details of ApplyStop in AmiBroker
79
• Trade Price: SellPrice = Open or Close
• ExitAtStop: 0, 1, or 2
• Volatility: True or False
• ReEntryDelay: especially in Sideways and many false signals
• ValidFrom & ValidTo: especially in stopModeRisk
• ActivateStopsImmediately: On or Off
Note: please study https://www.amibroker.com/guide/afl/applystop.html
ApplyStop(Type, Mode, Amount, ExitAtStop, Volatility, ReEntryDelay, ValidFrom, ValidTo);
WARNING
Can Code, but Not Execute = Useless
Can Execute, but Not Understand = Risky
80
ApplyStop Intro 2/2
AMIBROKER QUANT COURSE
81
Facts about ApplyStop in AmiBroker
•Compatibility between stopType and stopMode matters
• stopTypeNBar not compatible with stopModePercent
•Compatibility between stopMode and stopAmount matters
• stopModePercent not compatible with stopAmount 3ATR()
•Only one stopMode per one stopType is used
1. ApplyStop(stopTypeTrailing, stopModePercent, 15); //over ruled by next line
2. ApplyStop(stopTypeTrailing, stopModeRisk, 15);
•Keep it manageable and executable; otherwise, don’t use it
82
stopType… and stopMode… in AmiBroker
83
stopType…
stopMode…
Measured FromPoint Percent NBars Risk
Loss Entry price
Profit Entry price
NBar Entry bar
Trailing (1) (1) (2)
(1) % from High
(2) % from High - Entry
ApplyStop( Type, Mode, Amount, ExitAtStop, Volatility, ReentryDelay, ValidFrom, ValidTo);
stopMode… and stopAmount given: ATR(14) = 5
•ApplyStop(stopTypeLoss, stopModePoint, 10); //Entry: 125 -> then: 115
•ApplyStop(stopTypeLoss, stopModePercent, 10); //125->112.5
•ApplyStop(stopTypeLoss, stopModePercent, 2*ATR(14)); //Run, but non-sense
•ApplyStop(stopTypeLoss, stopModePoint, 2*ATR(14)); //125->115
•ApplyStop(stopTypeProfit, stopModePoint, 10); //Entry: 125 -> then: 135
•ApplyStop(stopTypeProfit, stopModePercent, 10); //125->137.5
•ApplyStop(stopTypeProfit, stopModePercent, 2*ATR(14));
•ApplyStop(stopTypeProfit, stopModePoint, 2*ATR(14)); //125->135
84
stopMode… and stopAmount given: ATR(14) = 5
•ApplyStop( stopTypeNBar, stopModeBars, 40); // Bar 0 until Bar 40
•ApplyStop( stopTypeNBar, stopModePercent, 40); //Run, but non-sense
•ApplyStop( stopTypeNBar, stopModePoint, 40); //Run, but non-sense
•ApplyStop( stopTypeTrailing, stopModePoint, 25); //100->125->100
•ApplyStop( stopTypeTrailing, stopModePoint, 5*ATR(14)); //100->125->100
•ApplyStop( stopTypeTrailing, stopModePercent, 25); //100->125->93.75
•ApplyStop( stopTypeTrailing, stopModeRisk, 25); //100->125->118.75
85
stopTypeTrailing with stopModeRisk
•ApplyStop( stopTypeTrailing, stopModeRisk, 25); //100->104->103 ???
•ApplyStop( stopTypeTrailing, stopModeRisk, 25, … , … , …, 20); // ValidFrom
86
ApplyStop( Type, Mode, Amount, ExitAtStop, Volatility, ReentryDelay, ValidFrom, ValidTo);
Conclusion for Basic ApplyStop in AmiBroker
•Not executable or not understand it, Don’t use it !
•Keep it simple and straightforward
•Prefer the followings:
• ApplyStop(stopTypeLoss, stopModePercent, 10); // 5 to 15%;
• ApplyStop(stopTypeProfit, stopModePercent, 20); // 15 to 35%;
• ApplyStop(stopTypeTrailing, stopModePercent, 25); // 20 to 30%;
• ApplyStop(stopTypeNBar, stopModeBars, 40); // Depends on strategy
•Keep stop co-ordinate and logical
•Read: https://www.amibroker.com/guide/afl/applystop.html
87
WARNING (AGAIN)
Can Code, but Not Execute = Useless
Can Execute, but Not Understand = Risky
88
Note: please study https://www.amibroker.com/guide/afl/applystop.html

Contenu connexe

Tendances

"Trading Strategies That Are Designed Not Fitted" by Robert Carver, Independe...
"Trading Strategies That Are Designed Not Fitted" by Robert Carver, Independe..."Trading Strategies That Are Designed Not Fitted" by Robert Carver, Independe...
"Trading Strategies That Are Designed Not Fitted" by Robert Carver, Independe...Quantopian
 
Quant trading with artificial intelligence
Quant trading with artificial intelligenceQuant trading with artificial intelligence
Quant trading with artificial intelligenceRoger Lee, CFA
 
11.วิธีสร้างระบบเทรด เพจ กัปตัน เทรดดิ้ง.pdf
11.วิธีสร้างระบบเทรด เพจ กัปตัน เทรดดิ้ง.pdf11.วิธีสร้างระบบเทรด เพจ กัปตัน เทรดดิ้ง.pdf
11.วิธีสร้างระบบเทรด เพจ กัปตัน เทรดดิ้ง.pdfMicro4you
 
Conference on Option Trading Techniques - Option Trading Strategies
Conference on Option Trading Techniques - Option Trading StrategiesConference on Option Trading Techniques - Option Trading Strategies
Conference on Option Trading Techniques - Option Trading StrategiesQuantInsti
 
Intra-Day De Mark Plus Order Flow Indicator by Dr. Christopher Ting, SMU
  Intra-Day De Mark Plus Order Flow Indicator by Dr. Christopher Ting, SMU  Intra-Day De Mark Plus Order Flow Indicator by Dr. Christopher Ting, SMU
Intra-Day De Mark Plus Order Flow Indicator by Dr. Christopher Ting, SMUQuantopian
 
Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...
Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...
Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...Quantopian
 
QuantConnect - Introduction to Pairs Trading
QuantConnect - Introduction to Pairs TradingQuantConnect - Introduction to Pairs Trading
QuantConnect - Introduction to Pairs TradingQuantConnect
 
Chart patterns final handout
Chart patterns   final handoutChart patterns   final handout
Chart patterns final handoutwijitha gayan
 
Menu Engineering
Menu EngineeringMenu Engineering
Menu EngineeringSyed Abbas
 
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016Quantopian
 
9.Dow Theory เพจ กัปตัน เทรดดิ้ง.pdf
9.Dow Theory เพจ กัปตัน เทรดดิ้ง.pdf9.Dow Theory เพจ กัปตัน เทรดดิ้ง.pdf
9.Dow Theory เพจ กัปตัน เทรดดิ้ง.pdfMicro4you
 
60 Second Binary Options Strategy: the complete guide
60 Second Binary Options Strategy: the complete guide60 Second Binary Options Strategy: the complete guide
60 Second Binary Options Strategy: the complete guideTrade Opus
 

Tendances (17)

"Trading Strategies That Are Designed Not Fitted" by Robert Carver, Independe...
"Trading Strategies That Are Designed Not Fitted" by Robert Carver, Independe..."Trading Strategies That Are Designed Not Fitted" by Robert Carver, Independe...
"Trading Strategies That Are Designed Not Fitted" by Robert Carver, Independe...
 
Quant trading with artificial intelligence
Quant trading with artificial intelligenceQuant trading with artificial intelligence
Quant trading with artificial intelligence
 
11.วิธีสร้างระบบเทรด เพจ กัปตัน เทรดดิ้ง.pdf
11.วิธีสร้างระบบเทรด เพจ กัปตัน เทรดดิ้ง.pdf11.วิธีสร้างระบบเทรด เพจ กัปตัน เทรดดิ้ง.pdf
11.วิธีสร้างระบบเทรด เพจ กัปตัน เทรดดิ้ง.pdf
 
Pre-purchase Exams
Pre-purchase ExamsPre-purchase Exams
Pre-purchase Exams
 
Conference on Option Trading Techniques - Option Trading Strategies
Conference on Option Trading Techniques - Option Trading StrategiesConference on Option Trading Techniques - Option Trading Strategies
Conference on Option Trading Techniques - Option Trading Strategies
 
Intra-Day De Mark Plus Order Flow Indicator by Dr. Christopher Ting, SMU
  Intra-Day De Mark Plus Order Flow Indicator by Dr. Christopher Ting, SMU  Intra-Day De Mark Plus Order Flow Indicator by Dr. Christopher Ting, SMU
Intra-Day De Mark Plus Order Flow Indicator by Dr. Christopher Ting, SMU
 
How to Trade Forex for Beginners
How to Trade Forex for BeginnersHow to Trade Forex for Beginners
How to Trade Forex for Beginners
 
Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...
Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...
Automated Selection and Robustness for Systematic Trading Strategies by Dr. T...
 
QuantConnect - Introduction to Pairs Trading
QuantConnect - Introduction to Pairs TradingQuantConnect - Introduction to Pairs Trading
QuantConnect - Introduction to Pairs Trading
 
Dos and dont in kitcen
Dos and dont in kitcenDos and dont in kitcen
Dos and dont in kitcen
 
Chart patterns final handout
Chart patterns   final handoutChart patterns   final handout
Chart patterns final handout
 
Menu Engineering
Menu EngineeringMenu Engineering
Menu Engineering
 
Psychology of a menu
Psychology of a menuPsychology of a menu
Psychology of a menu
 
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
A Guided Tour of Machine Learning for Traders by Tucker Balch at QuantCon 2016
 
9.Dow Theory เพจ กัปตัน เทรดดิ้ง.pdf
9.Dow Theory เพจ กัปตัน เทรดดิ้ง.pdf9.Dow Theory เพจ กัปตัน เทรดดิ้ง.pdf
9.Dow Theory เพจ กัปตัน เทรดดิ้ง.pdf
 
60 Second Binary Options Strategy: the complete guide
60 Second Binary Options Strategy: the complete guide60 Second Binary Options Strategy: the complete guide
60 Second Binary Options Strategy: the complete guide
 
Psychology of traders
Psychology of tradersPsychology of traders
Psychology of traders
 

En vedette

Understand Foreign Equity in AmiBroker
Understand Foreign Equity in AmiBrokerUnderstand Foreign Equity in AmiBroker
Understand Foreign Equity in AmiBrokerThaiQuants
 
AmiBroker Buy sell target & stop loss trading signals software for equity, co...
AmiBroker Buy sell target & stop loss trading signals software for equity, co...AmiBroker Buy sell target & stop loss trading signals software for equity, co...
AmiBroker Buy sell target & stop loss trading signals software for equity, co...Vishnu Kumar
 
Amibroker afl coding 28th atma bengaluru meet
Amibroker afl coding   28th atma bengaluru meetAmibroker afl coding   28th atma bengaluru meet
Amibroker afl coding 28th atma bengaluru meetMarketcalls
 
AmiBroker AFL to DLL Conversion
AmiBroker  AFL to DLL ConversionAmiBroker  AFL to DLL Conversion
AmiBroker AFL to DLL Conversionafl2dll
 
Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014Marketcalls
 
A Guide to Trading System Analysis : แนะนำแนวทางการอ่านผล Backtest เพื่อวิเคร...
A Guide to Trading System Analysis : แนะนำแนวทางการอ่านผล Backtest เพื่อวิเคร...A Guide to Trading System Analysis : แนะนำแนวทางการอ่านผล Backtest เพื่อวิเคร...
A Guide to Trading System Analysis : แนะนำแนวทางการอ่านผล Backtest เพื่อวิเคร...siamquant
 
Install and configure your amibroker software
Install and configure your amibroker softwareInstall and configure your amibroker software
Install and configure your amibroker softwarealexander N. N. Gilles
 
TradeZilla - Trading system Design
TradeZilla - Trading system DesignTradeZilla - Trading system Design
TradeZilla - Trading system DesignMarketcalls
 
Trading System Design
Trading System DesignTrading System Design
Trading System DesignMarketcalls
 
Selection Rotation Charts / Stats / Trades
Selection Rotation Charts / Stats / TradesSelection Rotation Charts / Stats / Trades
Selection Rotation Charts / Stats / TradesJason Unger
 
4s2 圖形拼砌與分割 教案(第4-5節)
4s2 圖形拼砌與分割 教案(第4-5節)4s2 圖形拼砌與分割 教案(第4-5節)
4s2 圖形拼砌與分割 教案(第4-5節)Ching Funpp Wong
 
Improving Your Trading Plan
Improving Your Trading PlanImproving Your Trading Plan
Improving Your Trading PlanBenjamin Cheeks
 
Limiti del modello Black-Scholes-Merton e vantaggi del metodo Monte Carlo: an...
Limiti del modello Black-Scholes-Merton e vantaggi del metodo Monte Carlo: an...Limiti del modello Black-Scholes-Merton e vantaggi del metodo Monte Carlo: an...
Limiti del modello Black-Scholes-Merton e vantaggi del metodo Monte Carlo: an...Matteo Evangelisti
 
Introduzione al metodo monte carlo
Introduzione al metodo monte carloIntroduzione al metodo monte carlo
Introduzione al metodo monte carloGiovanni Della Lunga
 
Plan your trade,trade your plan
Plan your trade,trade your planPlan your trade,trade your plan
Plan your trade,trade your planandy6898
 
18.如何用兩台totolink路由器設定wds
18.如何用兩台totolink路由器設定wds18.如何用兩台totolink路由器設定wds
18.如何用兩台totolink路由器設定wds臺灣塔米歐
 
Risk management - Avvocato del diavolo
Risk management - Avvocato del diavoloRisk management - Avvocato del diavolo
Risk management - Avvocato del diavoloManager.it
 

En vedette (20)

Understand Foreign Equity in AmiBroker
Understand Foreign Equity in AmiBrokerUnderstand Foreign Equity in AmiBroker
Understand Foreign Equity in AmiBroker
 
AmiBroker Buy sell target & stop loss trading signals software for equity, co...
AmiBroker Buy sell target & stop loss trading signals software for equity, co...AmiBroker Buy sell target & stop loss trading signals software for equity, co...
AmiBroker Buy sell target & stop loss trading signals software for equity, co...
 
Amibroker afl coding 28th atma bengaluru meet
Amibroker afl coding   28th atma bengaluru meetAmibroker afl coding   28th atma bengaluru meet
Amibroker afl coding 28th atma bengaluru meet
 
AmiBroker AFL to DLL Conversion
AmiBroker  AFL to DLL ConversionAmiBroker  AFL to DLL Conversion
AmiBroker AFL to DLL Conversion
 
Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014
 
A Guide to Trading System Analysis : แนะนำแนวทางการอ่านผล Backtest เพื่อวิเคร...
A Guide to Trading System Analysis : แนะนำแนวทางการอ่านผล Backtest เพื่อวิเคร...A Guide to Trading System Analysis : แนะนำแนวทางการอ่านผล Backtest เพื่อวิเคร...
A Guide to Trading System Analysis : แนะนำแนวทางการอ่านผล Backtest เพื่อวิเคร...
 
Install and configure your amibroker software
Install and configure your amibroker softwareInstall and configure your amibroker software
Install and configure your amibroker software
 
TradeZilla - Trading system Design
TradeZilla - Trading system DesignTradeZilla - Trading system Design
TradeZilla - Trading system Design
 
Trading System Design
Trading System DesignTrading System Design
Trading System Design
 
Selection Rotation Charts / Stats / Trades
Selection Rotation Charts / Stats / TradesSelection Rotation Charts / Stats / Trades
Selection Rotation Charts / Stats / Trades
 
Stock trader types
Stock trader typesStock trader types
Stock trader types
 
4s2 圖形拼砌與分割 教案(第4-5節)
4s2 圖形拼砌與分割 教案(第4-5節)4s2 圖形拼砌與分割 教案(第4-5節)
4s2 圖形拼砌與分割 教案(第4-5節)
 
Improving Your Trading Plan
Improving Your Trading PlanImproving Your Trading Plan
Improving Your Trading Plan
 
Limiti del modello Black-Scholes-Merton e vantaggi del metodo Monte Carlo: an...
Limiti del modello Black-Scholes-Merton e vantaggi del metodo Monte Carlo: an...Limiti del modello Black-Scholes-Merton e vantaggi del metodo Monte Carlo: an...
Limiti del modello Black-Scholes-Merton e vantaggi del metodo Monte Carlo: an...
 
Introduzione al metodo monte carlo
Introduzione al metodo monte carloIntroduzione al metodo monte carlo
Introduzione al metodo monte carlo
 
Plan your trade,trade your plan
Plan your trade,trade your planPlan your trade,trade your plan
Plan your trade,trade your plan
 
18.如何用兩台totolink路由器設定wds
18.如何用兩台totolink路由器設定wds18.如何用兩台totolink路由器設定wds
18.如何用兩台totolink路由器設定wds
 
Risk management - Avvocato del diavolo
Risk management - Avvocato del diavoloRisk management - Avvocato del diavolo
Risk management - Avvocato del diavolo
 
Trading system designer
Trading system designerTrading system designer
Trading system designer
 
Td sequential2
Td sequential2Td sequential2
Td sequential2
 

Similaire à AmiBroker ApplyStop Introduction

Verilog Lecture3 hust 2014
Verilog Lecture3 hust 2014Verilog Lecture3 hust 2014
Verilog Lecture3 hust 2014Béo Tú
 
Equity Option Trading : Derivatives Market Practices
Equity Option Trading : Derivatives Market PracticesEquity Option Trading : Derivatives Market Practices
Equity Option Trading : Derivatives Market PracticesJames Prichard
 
Developing Maintenance Strategies Using RCM Aided by Reliability Engineering ...
Developing Maintenance Strategies Using RCM Aided by Reliability Engineering ...Developing Maintenance Strategies Using RCM Aided by Reliability Engineering ...
Developing Maintenance Strategies Using RCM Aided by Reliability Engineering ...Gilbert Hamambi
 
Fractal Trading Strategies for Bloomberg Professional
Fractal Trading Strategies for Bloomberg ProfessionalFractal Trading Strategies for Bloomberg Professional
Fractal Trading Strategies for Bloomberg Professionalbzinchenko
 
TMMi: should you care? Step-Auto Conference 2013, Bangalore
TMMi: should you care? Step-Auto Conference 2013, BangaloreTMMi: should you care? Step-Auto Conference 2013, Bangalore
TMMi: should you care? Step-Auto Conference 2013, BangaloreSYSQA BV
 
Mdp plus 2.1
Mdp plus 2.1Mdp plus 2.1
Mdp plus 2.1boedax
 
__MESA presentation,Profitable Adaptive Trading Systems.ppt
__MESA presentation,Profitable Adaptive Trading Systems.ppt__MESA presentation,Profitable Adaptive Trading Systems.ppt
__MESA presentation,Profitable Adaptive Trading Systems.pptssuser48f316
 
Control Statement.ppt
Control Statement.pptControl Statement.ppt
Control Statement.pptsanjay
 

Similaire à AmiBroker ApplyStop Introduction (11)

Verilog Lecture3 hust 2014
Verilog Lecture3 hust 2014Verilog Lecture3 hust 2014
Verilog Lecture3 hust 2014
 
Equity Option Trading : Derivatives Market Practices
Equity Option Trading : Derivatives Market PracticesEquity Option Trading : Derivatives Market Practices
Equity Option Trading : Derivatives Market Practices
 
Developing Maintenance Strategies Using RCM Aided by Reliability Engineering ...
Developing Maintenance Strategies Using RCM Aided by Reliability Engineering ...Developing Maintenance Strategies Using RCM Aided by Reliability Engineering ...
Developing Maintenance Strategies Using RCM Aided by Reliability Engineering ...
 
Fractal Trading Strategies for Bloomberg Professional
Fractal Trading Strategies for Bloomberg ProfessionalFractal Trading Strategies for Bloomberg Professional
Fractal Trading Strategies for Bloomberg Professional
 
Lesson 5
Lesson 5Lesson 5
Lesson 5
 
TMMi: should you care? Step-Auto Conference 2013, Bangalore
TMMi: should you care? Step-Auto Conference 2013, BangaloreTMMi: should you care? Step-Auto Conference 2013, Bangalore
TMMi: should you care? Step-Auto Conference 2013, Bangalore
 
Mdp plus 2.1
Mdp plus 2.1Mdp plus 2.1
Mdp plus 2.1
 
__MESA presentation,Profitable Adaptive Trading Systems.ppt
__MESA presentation,Profitable Adaptive Trading Systems.ppt__MESA presentation,Profitable Adaptive Trading Systems.ppt
__MESA presentation,Profitable Adaptive Trading Systems.ppt
 
Control Statement.ppt
Control Statement.pptControl Statement.ppt
Control Statement.ppt
 
StereoTraderMT_Reference-ttp.pdf
StereoTraderMT_Reference-ttp.pdfStereoTraderMT_Reference-ttp.pdf
StereoTraderMT_Reference-ttp.pdf
 
StereoTraderMT_Reference-ttp-low.pdf
StereoTraderMT_Reference-ttp-low.pdfStereoTraderMT_Reference-ttp-low.pdf
StereoTraderMT_Reference-ttp-low.pdf
 

Dernier

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Dernier (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

AmiBroker ApplyStop Introduction

  • 2. When to sell? 1. Sell Signals • Sell = sellConMKC AND (sellCon1 AND sellCon2 …); 2. Stop Triggers • ApplyStop( stopTypeLoss, stopModePercent, 15); 3. Better opportunities • Calculate current positions • Calculate opportunities, and then compare to current positions • Force sell signals, and then enter a better opportunity Note: use CBI to perform 3. 74
  • 3. Facts about Stop Triggers •Stops can help or hurt your results •Change of degree in stop could result favorably or unfavorably •Limitation in AmiBroker •Backtesting VS Execution •Keep it manageable and executable; otherwise, don’t use it 75
  • 4. Basic ApplyStop in AmiBroker 76 ApplyStop( Type, Mode, Amount); • stopTypeLoss • stopTypeProfit • stopTypeNBar • stopTypeTrailing • stopModePoint • stopModePercent • stopModeBars • stopModeRisk • Number: 15 • Point • Percent • Bars • Array: 3ATR(14)
  • 5. 77 40 days 100 100 120 Profit from High = 120 – 100 = 20, then 10% profit = 2 118 100 120 High at 120, 10% = 12 High at 110, 10% = 11 108 99 -10% 100 90 10% 100 110 ApplyStop(stopTypeLoss, stopModePercent, 10); ApplyStop(stopTypeProfit, stopModePercent, 10); ApplyStop(stopTypeNBar, stopModeBars, 40); ApplyStop(stopTypeTrailing, stopModePercent, 10); ApplyStop(stopTypeTrailing, stopModeRisk, 10);
  • 6. EASY ? Not so fast ! 78
  • 7. More Details of ApplyStop in AmiBroker 79 • Trade Price: SellPrice = Open or Close • ExitAtStop: 0, 1, or 2 • Volatility: True or False • ReEntryDelay: especially in Sideways and many false signals • ValidFrom & ValidTo: especially in stopModeRisk • ActivateStopsImmediately: On or Off Note: please study https://www.amibroker.com/guide/afl/applystop.html ApplyStop(Type, Mode, Amount, ExitAtStop, Volatility, ReEntryDelay, ValidFrom, ValidTo);
  • 8. WARNING Can Code, but Not Execute = Useless Can Execute, but Not Understand = Risky 80
  • 10. Facts about ApplyStop in AmiBroker •Compatibility between stopType and stopMode matters • stopTypeNBar not compatible with stopModePercent •Compatibility between stopMode and stopAmount matters • stopModePercent not compatible with stopAmount 3ATR() •Only one stopMode per one stopType is used 1. ApplyStop(stopTypeTrailing, stopModePercent, 15); //over ruled by next line 2. ApplyStop(stopTypeTrailing, stopModeRisk, 15); •Keep it manageable and executable; otherwise, don’t use it 82
  • 11. stopType… and stopMode… in AmiBroker 83 stopType… stopMode… Measured FromPoint Percent NBars Risk Loss Entry price Profit Entry price NBar Entry bar Trailing (1) (1) (2) (1) % from High (2) % from High - Entry ApplyStop( Type, Mode, Amount, ExitAtStop, Volatility, ReentryDelay, ValidFrom, ValidTo);
  • 12. stopMode… and stopAmount given: ATR(14) = 5 •ApplyStop(stopTypeLoss, stopModePoint, 10); //Entry: 125 -> then: 115 •ApplyStop(stopTypeLoss, stopModePercent, 10); //125->112.5 •ApplyStop(stopTypeLoss, stopModePercent, 2*ATR(14)); //Run, but non-sense •ApplyStop(stopTypeLoss, stopModePoint, 2*ATR(14)); //125->115 •ApplyStop(stopTypeProfit, stopModePoint, 10); //Entry: 125 -> then: 135 •ApplyStop(stopTypeProfit, stopModePercent, 10); //125->137.5 •ApplyStop(stopTypeProfit, stopModePercent, 2*ATR(14)); •ApplyStop(stopTypeProfit, stopModePoint, 2*ATR(14)); //125->135 84
  • 13. stopMode… and stopAmount given: ATR(14) = 5 •ApplyStop( stopTypeNBar, stopModeBars, 40); // Bar 0 until Bar 40 •ApplyStop( stopTypeNBar, stopModePercent, 40); //Run, but non-sense •ApplyStop( stopTypeNBar, stopModePoint, 40); //Run, but non-sense •ApplyStop( stopTypeTrailing, stopModePoint, 25); //100->125->100 •ApplyStop( stopTypeTrailing, stopModePoint, 5*ATR(14)); //100->125->100 •ApplyStop( stopTypeTrailing, stopModePercent, 25); //100->125->93.75 •ApplyStop( stopTypeTrailing, stopModeRisk, 25); //100->125->118.75 85
  • 14. stopTypeTrailing with stopModeRisk •ApplyStop( stopTypeTrailing, stopModeRisk, 25); //100->104->103 ??? •ApplyStop( stopTypeTrailing, stopModeRisk, 25, … , … , …, 20); // ValidFrom 86 ApplyStop( Type, Mode, Amount, ExitAtStop, Volatility, ReentryDelay, ValidFrom, ValidTo);
  • 15. Conclusion for Basic ApplyStop in AmiBroker •Not executable or not understand it, Don’t use it ! •Keep it simple and straightforward •Prefer the followings: • ApplyStop(stopTypeLoss, stopModePercent, 10); // 5 to 15%; • ApplyStop(stopTypeProfit, stopModePercent, 20); // 15 to 35%; • ApplyStop(stopTypeTrailing, stopModePercent, 25); // 20 to 30%; • ApplyStop(stopTypeNBar, stopModeBars, 40); // Depends on strategy •Keep stop co-ordinate and logical •Read: https://www.amibroker.com/guide/afl/applystop.html 87
  • 16. WARNING (AGAIN) Can Code, but Not Execute = Useless Can Execute, but Not Understand = Risky 88 Note: please study https://www.amibroker.com/guide/afl/applystop.html