DojiEmoji

Kaufman's Efficiency Ratio Strategy [KL]

DojiEmoji تم تحديثه   
I recently published an indicator called "Kaufman's Efficiency Ratio Indicator". In the description of that script, I hypothesized about how the Efficiency Ratio could be applied to identify bullish moves in instances where price had already gone up steeply, but rests for a while, allowing for entry in expectation that price will continually rise. I decided to test out this idea with Pinescript.

About Kaufman's Efficiency Ratio ("ER")
ER was developed by a systematic trader by the name of Perry J. Kaufman.

Formula
The formula is:
= A divided by B,
where:
  • A = Current closing price minus the closing price at the start of the lookback period
  • B = Sum of differences between closing prices (in absolute terms) of consecutive bars over the lookback period

How this strategy enters a trade (Long):
- code: entry_signal_long = ER > 0 and ER_is_mid
- meaning: when ER is positive, strategy assumes price has risen. Usually ER value begins high (red), and unless it is a false move, then it should stay positive. This strategy will patiently wait until ER drops to medium (yellow), and then place a trade.
- how low/medium/high is dynamically determined: Refer to the description of my other script("Kaufman's Efficiency Ratio Indicator") for details. Trying to keep this as short as possible.

How this strategy exits a trade (Long):
- when price hits stop limit; stop limit is based on low of bars, trails upward based on ATR
- included a feature called "tightening TSL", which tries to reduce the stop-buffer during periods of high volatility implied by ER (very experimental, opening the floor for suggestions on how this can be improved)
ملاحظات الأخبار:
Added profit taking levels. Also amended risk management aspects the strategy.
Changes:
- Order size is based on user-defined percentage of committed capital
- Profit taking over 3 levels based on risk to reward ratio (i.e. 1R, 2R, 3R). When a target is met at each tier, strategy will close out one third of current position size. Unreached targets will eventually be closed at the trailing stoploss price.
ملاحظات الأخبار:
(a) Fixed a bug relating to profit taking over 3 levels (described in the previous update), and (b) refactored other parts of the codes to have (neat spacings, better variable names, etc).
ملاحظات الأخبار:
(a) Added short (default not used), and (b) removed: entry confirmation checking for ER being low/mid/high. Through backtests, noticed better results when not using it.
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟