SlideShare a Scribd company logo
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

More Related Content

What's hot

Market Strategies Using Options
Market Strategies Using OptionsMarket Strategies Using Options
Market Strategies Using OptionsNavin Bafna
 
Probabilities in trading
Probabilities in tradingProbabilities in trading
Probabilities in trading
platinumtradingacademypta
 
Simple trading strategy for beginners
Simple trading strategy for beginnersSimple trading strategy for beginners
Simple trading strategy for beginners
pipsumo traderfx
 
Forex Trading For Beginners
Forex Trading For BeginnersForex Trading For Beginners
Forex Trading For Beginners
Syrous Pejman
 
Trading plan
Trading planTrading plan
Trading plan
pipsumo traderfx
 
Bollinger bands strategy - With Moving Averaga (BBMA)
Bollinger bands strategy - With Moving Averaga (BBMA)Bollinger bands strategy - With Moving Averaga (BBMA)
Bollinger bands strategy - With Moving Averaga (BBMA)
pipsumo traderfx
 
Scalping in Day Trading
Scalping in Day TradingScalping in Day Trading
Scalping in Day Trading
InvestingTips
 
Technical Analysis in Forex Trading
Technical Analysis in Forex TradingTechnical Analysis in Forex Trading
Technical Analysis in Forex Trading
IFC Markets Corp.
 
Straddle Options
Straddle OptionsStraddle Options
Straddle Options
InvestingTips
 
Price Action Trading.pdf
Price Action Trading.pdfPrice Action Trading.pdf
Price Action Trading.pdf
Shreya292338
 
Forex scalping
Forex scalpingForex scalping
Forex scalping
hamza assaad
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
nattyvirk
 
Pull Back Swing Trading Strategy I The Only Way To Trade Stocks and E-Mini Re...
Pull Back Swing Trading Strategy I The Only Way To Trade Stocks and E-Mini Re...Pull Back Swing Trading Strategy I The Only Way To Trade Stocks and E-Mini Re...
Pull Back Swing Trading Strategy I The Only Way To Trade Stocks and E-Mini Re...
Marketgeekschannel
 
Psychology of Trading
Psychology of TradingPsychology of Trading
Psychology of Tradingsumeetsj
 
"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
 
The simple scalping strategy rules
The simple scalping strategy rules  The simple scalping strategy rules
The simple scalping strategy rules
Nasir Tareen
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
Vincent Chen
 
Trade what you see not what you think
Trade what you see not what you thinkTrade what you see not what you think
Trade what you see not what you think
Ninja Tan
 
Secrets of Price Action Trading
Secrets of Price Action TradingSecrets of Price Action Trading
Secrets of Price Action Trading
Syrous Pejman
 

What's hot (20)

Market Strategies Using Options
Market Strategies Using OptionsMarket Strategies Using Options
Market Strategies Using Options
 
Probabilities in trading
Probabilities in tradingProbabilities in trading
Probabilities in trading
 
Simple trading strategy for beginners
Simple trading strategy for beginnersSimple trading strategy for beginners
Simple trading strategy for beginners
 
Forex Trading For Beginners
Forex Trading For BeginnersForex Trading For Beginners
Forex Trading For Beginners
 
Trading plan
Trading planTrading plan
Trading plan
 
Bollinger bands strategy - With Moving Averaga (BBMA)
Bollinger bands strategy - With Moving Averaga (BBMA)Bollinger bands strategy - With Moving Averaga (BBMA)
Bollinger bands strategy - With Moving Averaga (BBMA)
 
Scalping in Day Trading
Scalping in Day TradingScalping in Day Trading
Scalping in Day Trading
 
Technical Analysis in Forex Trading
Technical Analysis in Forex TradingTechnical Analysis in Forex Trading
Technical Analysis in Forex Trading
 
Straddle Options
Straddle OptionsStraddle Options
Straddle Options
 
Price Action Trading.pdf
Price Action Trading.pdfPrice Action Trading.pdf
Price Action Trading.pdf
 
Forex scalping
Forex scalpingForex scalping
Forex scalping
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
 
Pull Back Swing Trading Strategy I The Only Way To Trade Stocks and E-Mini Re...
Pull Back Swing Trading Strategy I The Only Way To Trade Stocks and E-Mini Re...Pull Back Swing Trading Strategy I The Only Way To Trade Stocks and E-Mini Re...
Pull Back Swing Trading Strategy I The Only Way To Trade Stocks and E-Mini Re...
 
Psychology of Trading
Psychology of TradingPsychology of Trading
Psychology of Trading
 
"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...
 
The simple scalping strategy rules
The simple scalping strategy rules  The simple scalping strategy rules
The simple scalping strategy rules
 
Futures and options
Futures and optionsFutures and options
Futures and options
 
Pairs Trading
Pairs TradingPairs Trading
Pairs Trading
 
Trade what you see not what you think
Trade what you see not what you thinkTrade what you see not what you think
Trade what you see not what you think
 
Secrets of Price Action Trading
Secrets of Price Action TradingSecrets of Price Action Trading
Secrets of Price Action Trading
 

Viewers also liked

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 meet
Marketcalls
 
AmiBroker AFL to DLL Conversion
AmiBroker  AFL to DLL ConversionAmiBroker  AFL to DLL Conversion
AmiBroker AFL to DLL Conversion
afl2dll
 
Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014Coimbatore amibroker workshop 2014
Coimbatore amibroker workshop 2014
Marketcalls
 
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 Design
Marketcalls
 
Trading System Design
Trading System DesignTrading System Design
Trading System Design
Marketcalls
 
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 Plan
Benjamin 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 diavolo
Manager.it
 
Trading system designer
Trading system designerTrading system designer
Trading system designer
Rodrigo Sucupira
 
Td sequential2
Td sequential2Td sequential2
Td sequential2
Arpit Nanavati
 
Transition to a_hedge fund_-_wsi
Transition to a_hedge fund_-_wsiTransition to a_hedge fund_-_wsi
Transition to a_hedge fund_-_wsikevinWSI
 

Viewers also liked (20)

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
 
Transition to a_hedge fund_-_wsi
Transition to a_hedge fund_-_wsiTransition to a_hedge fund_-_wsi
Transition to a_hedge fund_-_wsi
 

Similar to AmiBroker ApplyStop Introduction

Verilog Lecture3 hust 2014
Verilog Lecture3 hust 2014Verilog Lecture3 hust 2014
Verilog Lecture3 hust 2014
Béo Tú
 
Equity Option Trading : Derivatives Market Practices
Equity Option Trading : Derivatives Market PracticesEquity Option Trading : Derivatives Market Practices
Equity Option Trading : Derivatives Market Practices
James 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 Professional
bzinchenko
 
Lesson 5
Lesson 5Lesson 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
SYSQA 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.ppt
ssuser48f316
 
Control Statement.ppt
Control Statement.pptControl Statement.ppt
Control Statement.ppt
sanjay
 
StereoTraderMT_Reference-ttp.pdf
StereoTraderMT_Reference-ttp.pdfStereoTraderMT_Reference-ttp.pdf
StereoTraderMT_Reference-ttp.pdf
The Trading Pit Official
 
StereoTraderMT_Reference-ttp-low.pdf
StereoTraderMT_Reference-ttp-low.pdfStereoTraderMT_Reference-ttp-low.pdf
StereoTraderMT_Reference-ttp-low.pdf
The Trading Pit Official
 

Similar to 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
 

Recently uploaded

Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 

Recently uploaded (20)

Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 

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