SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Support and resistance trading
Support and resistance tradingSupport and resistance trading
Support and resistance tradingmgeek007
 
How To Find The Best Stocks To Buy BEFORE They Breakout
How To Find The Best Stocks To Buy BEFORE They BreakoutHow To Find The Best Stocks To Buy BEFORE They Breakout
How To Find The Best Stocks To Buy BEFORE They BreakoutMorpheus Trading Group
 
"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
 
Momentum Investing!! is that an Oxymoron.
Momentum Investing!! is that an Oxymoron.Momentum Investing!! is that an Oxymoron.
Momentum Investing!! is that an Oxymoron.Manish Dhawan
 
Learn A Simple Range Trading Strategy
Learn A Simple Range Trading StrategyLearn A Simple Range Trading Strategy
Learn A Simple Range Trading StrategyNetpicksTrading
 
Fibonacci analysis
Fibonacci analysisFibonacci analysis
Fibonacci analysisypendharkar
 
LC's Forex Trading System
LC's Forex Trading SystemLC's Forex Trading System
LC's Forex Trading Systemlcchong76
 
Trade Forex From Home - 10 Biggest Mistakes New Forex Traders Make (And How T...
Trade Forex From Home - 10 Biggest Mistakes New Forex Traders Make (And How T...Trade Forex From Home - 10 Biggest Mistakes New Forex Traders Make (And How T...
Trade Forex From Home - 10 Biggest Mistakes New Forex Traders Make (And How T...ForexTraining
 
Trading Essentials.pdf
Trading Essentials.pdfTrading Essentials.pdf
Trading Essentials.pdfnorilynPusa
 
Stock chart-Chart patterns and formations-Analysis of chart pattern
Stock chart-Chart patterns and formations-Analysis of chart patternStock chart-Chart patterns and formations-Analysis of chart pattern
Stock chart-Chart patterns and formations-Analysis of chart patternAkbarAli309
 
Avoid Choppy Markets With These 2 Indicators
Avoid Choppy Markets With These 2 IndicatorsAvoid Choppy Markets With These 2 Indicators
Avoid Choppy Markets With These 2 IndicatorsNetpicksTrading
 
Webinar Mean Reversion Strategies Presentation
Webinar Mean Reversion Strategies PresentationWebinar Mean Reversion Strategies Presentation
Webinar Mean Reversion Strategies PresentationQuantInsti
 
A Look Back at 11 Stock Trading Setups
A Look Back at 11 Stock Trading SetupsA Look Back at 11 Stock Trading Setups
A Look Back at 11 Stock Trading SetupsInvestingWithOptions
 
Oliver velez swing trading tactics
Oliver velez   swing trading tacticsOliver velez   swing trading tactics
Oliver velez swing trading tacticsAislan Pereira
 
Algorithmic trading
Algorithmic tradingAlgorithmic trading
Algorithmic tradingTushar Rathi
 
RTS 315 Scalping Trading System
RTS 315 Scalping Trading SystemRTS 315 Scalping Trading System
RTS 315 Scalping Trading System24Trader
 

Was ist angesagt? (20)

Support and resistance trading
Support and resistance tradingSupport and resistance trading
Support and resistance trading
 
How To Find The Best Stocks To Buy BEFORE They Breakout
How To Find The Best Stocks To Buy BEFORE They BreakoutHow To Find The Best Stocks To Buy BEFORE They Breakout
How To Find The Best Stocks To Buy BEFORE They Breakout
 
11 habits of disciplined trader
11 habits of disciplined trader11 habits of disciplined trader
11 habits of disciplined trader
 
Yield Curve Trading Strategies
Yield Curve Trading Strategies Yield Curve Trading Strategies
Yield Curve Trading Strategies
 
"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...
 
Momentum Investing!! is that an Oxymoron.
Momentum Investing!! is that an Oxymoron.Momentum Investing!! is that an Oxymoron.
Momentum Investing!! is that an Oxymoron.
 
Learn A Simple Range Trading Strategy
Learn A Simple Range Trading StrategyLearn A Simple Range Trading Strategy
Learn A Simple Range Trading Strategy
 
Fibonacci analysis
Fibonacci analysisFibonacci analysis
Fibonacci analysis
 
LC's Forex Trading System
LC's Forex Trading SystemLC's Forex Trading System
LC's Forex Trading System
 
Trade Forex From Home - 10 Biggest Mistakes New Forex Traders Make (And How T...
Trade Forex From Home - 10 Biggest Mistakes New Forex Traders Make (And How T...Trade Forex From Home - 10 Biggest Mistakes New Forex Traders Make (And How T...
Trade Forex From Home - 10 Biggest Mistakes New Forex Traders Make (And How T...
 
Trading Essentials.pdf
Trading Essentials.pdfTrading Essentials.pdf
Trading Essentials.pdf
 
Stock chart-Chart patterns and formations-Analysis of chart pattern
Stock chart-Chart patterns and formations-Analysis of chart patternStock chart-Chart patterns and formations-Analysis of chart pattern
Stock chart-Chart patterns and formations-Analysis of chart pattern
 
Avoid Choppy Markets With These 2 Indicators
Avoid Choppy Markets With These 2 IndicatorsAvoid Choppy Markets With These 2 Indicators
Avoid Choppy Markets With These 2 Indicators
 
Webinar Mean Reversion Strategies Presentation
Webinar Mean Reversion Strategies PresentationWebinar Mean Reversion Strategies Presentation
Webinar Mean Reversion Strategies Presentation
 
A Look Back at 11 Stock Trading Setups
A Look Back at 11 Stock Trading SetupsA Look Back at 11 Stock Trading Setups
A Look Back at 11 Stock Trading Setups
 
Introduction to Scalping Futures
Introduction to Scalping FuturesIntroduction to Scalping Futures
Introduction to Scalping Futures
 
Oliver velez swing trading tactics
Oliver velez   swing trading tacticsOliver velez   swing trading tactics
Oliver velez swing trading tactics
 
Algorithmic trading
Algorithmic tradingAlgorithmic trading
Algorithmic trading
 
CANDLESTICK PROFITS.pdf
CANDLESTICK PROFITS.pdfCANDLESTICK PROFITS.pdf
CANDLESTICK PROFITS.pdf
 
RTS 315 Scalping Trading System
RTS 315 Scalping Trading SystemRTS 315 Scalping Trading System
RTS 315 Scalping Trading System
 

Andere mochten auch

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 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
 
Transition to a_hedge fund_-_wsi
Transition to a_hedge fund_-_wsiTransition to a_hedge fund_-_wsi
Transition to a_hedge fund_-_wsikevinWSI
 
12 afl strategies
12 afl strategies12 afl strategies
12 afl strategiesaealey
 

Andere mochten auch (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 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
 
12 afl strategies
12 afl strategies12 afl strategies
12 afl strategies
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
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
 

Kürzlich hochgeladen (20)

Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
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
 

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