XAUUSD M5 Pullback BUYSELL/TPSL [Condark]English: Input Settings Explanation
Strategy Settings (การตั้งค่ากลยุทธ์)
Timeframe คุมเทรนด์ (Trend Control Timeframe): The higher timeframe used to determine the main trend direction. Default is "15" (15 minutes).
EMA Length (EMA Length for Trend): The length of the Exponential Moving Average on the higher timeframe. A higher value means a slower, more stable trend line. Default is 50.
EMA สำหรับ Pullback (M5) (EMA for Pullback): The length of the EMA on the current chart (M5) that the price is expected to pull back to. Default is 21.
TDI Settings (การตั้งค่า TDI)
RSI Period: The lookback period for the RSI calculation, which forms the basis of the TDI's green line. Default is 13.
Signal Line Period (เส้นแดง): The period for the Simple Moving Average of the RSI line, creating the TDI's red "Signal Line". Default is 7.
Additional Filters Settings (การตั้งค่า Filters เพิ่มเติม)
เปิด/ปิด Proximity Filter (Enable/Disable Proximity Filter): A switch to turn the filter on or off. When on, it only allows trades that occur close to the higher timeframe's EMA.
ระยะห่างที่ยอมรับได้ (ATR Multiplier) (Acceptable Distance): Defines "how close" the entry must be to the M15 EMA. The distance is calculated as this number multiplied by the current ATR value. A smaller number means the entry must be very close. Default is 2.5.
เปิด/ปิด ADX/DI Filter (Enable/Disable ADX/DI Filter): A switch to turn the trend strength filter on or off.
ADX Trend Level (ต้องสูงกว่า): The minimum ADX value required to consider the market as "trending". A trade will only be taken if the ADX is above this level. Default is 20.
เปิด/ปิด ATR Volatility Filter (Enable/Disable ATR Volatility Filter): A switch to turn the volatility filter on or off. When on, it prevents trades if the market volatility is too low. Default is off.
ATR Filter MA Length: The period for the moving average of the ATR. A trade is only allowed if the current ATR is higher than its moving average.
TP/SL Settings (การตั้งค่า TP/SL)
ATR Length: The lookback period for the Average True Range (ATR) calculation, used to determine the size of the TP and SL. Default is 14.
ตัวคูณ Stop Loss (จาก ATR) (Stop Loss Multiplier): This number is multiplied by the ATR value to set the Stop Loss distance from the entry price. Default is 1.5.
ตัวคูณ Take Profit (จาก ATR) (Take Profit Multiplier): This number is multiplied by the ATR value to set the Take Profit distance from the entry price. Default is 2.5.
Table Settings (การตั้งค่าตาราง)
ตำแหน่งตาราง (Table Position): Allows you to choose where the performance summary table is displayed on the chart (e.g., top-right, bottom-left).
ภาษาไทย: คำอธิบายการตั้งค่า (Settings)
การตั้งค่ากลยุทธ์ (Strategy Settings)
Timeframe คุมเทรนด์: ไทม์เฟรมที่ใช้ในการกำหนดทิศทางของเทรนด์หลัก ค่าเริ่มต้นคือ "15" (15 นาที)
EMA Length: ความยาวของเส้น EMA ในไทม์เฟรมที่ใช้คุมเทรนด์ ยิ่งค่ามากเส้นเทรนด์จะยิ่งช้าและนิ่งขึ้น ค่าเริ่มต้นคือ 50
EMA สำหรับ Pullback (M5): ความยาวของเส้น EMA ในกราฟปัจจุบัน (M5) ซึ่งเป็นเส้นที่คาดหวังให้ราคาย่อตัวกลับมาหา ค่าเริ่มต้นคือ 21
การตั้งค่า TDI (TDI Settings)
RSI Period: จำนวนแท่งเทียนย้อนหลังที่ใช้ในการคำนวณ RSI ซึ่งเป็นพื้นฐานของเส้นสีเขียวใน TDI ค่าเริ่มต้นคือ 13
Signal Line Period (เส้นแดง): จำนวนแท่งเทียนที่ใช้ในการคำนวณเส้นค่าเฉลี่ย (SMA) ของ RSI เพื่อสร้างเป็นเส้น Signal Line (สีแดง) ของ TDI ค่าเริ่มต้นคือ 7
การตั้งค่า Filters เพิ่มเติม (Additional Filters Settings)
เปิด/ปิด Proximity Filter: ปุ่มสำหรับเปิดหรือปิดฟิลเตอร์ เมื่อเปิดใช้งาน จะอนุญาตให้เทรดเฉพาะเมื่อจุดเข้าอยู่ใกล้กับเส้น EMA ของ M15 เท่านั้น
ระยะห่างที่ยอมรับได้ (ATR Multiplier): กำหนดว่าจุดเข้าต้อง "ใกล้แค่ไหน" กับเส้น EMA M15 โดยระยะห่างจะคำนวณจากค่านี้คูณกับค่า ATR ปัจจุบัน ยิ่งค่าน้อยแปลว่าต้องยิ่งใกล้มาก ค่าเริ่มต้นคือ 2.5
เปิด/ปิด ADX/DI Filter: ปุ่มสำหรับเปิดหรือปิดฟิลเตอร์ความแรงของเทรนด์
ADX Trend Level (ต้องสูงกว่า): ค่า ADX ขั้นต่ำที่บ่งบอกว่าตลาดกำลัง "มีเทรนด์" การเทรดจะเกิดขึ้นต่อเมื่อค่า ADX สูงกว่าระดับนี้ ค่าเริ่มต้นคือ 20
เปิด/ปิด ATR Volatility Filter: ปุ่มสำหรับเปิดหรือปิดฟิลเตอร์ความผันผวน เมื่อเปิดใช้งาน จะป้องกันการเทรดหากตลาดมีความผันผวนต่ำเกินไป (ค่าเริ่มต้นคือปิด)
ATR Filter MA Length: จำนวนแท่งเทียนที่ใช้คำนวณเส้นค่าเฉลี่ยของ ATR การเทรดจะเกิดขึ้นต่อเมื่อค่า ATR ปัจจุบันสูงกว่าค่าเฉลี่ยของมัน
การตั้งค่า TP/SL (TP/SL Settings)
ATR Length: จำนวนแท่งเทียนย้อนหลังที่ใช้ในการคำนวณ Average True Range (ATR) เพื่อนำไปกำหนดขนาดของ TP และ SL ค่าเริ่มต้นคือ 14
ตัวคูณ Stop Loss (จาก ATR): ตัวเลขนี้จะถูกนำไปคูณกับค่า ATR เพื่อกำหนดระยะ Stop Loss จากราคาเข้า ค่าเริ่มต้นคือ 1.5
ตัวคูณ Take Profit (จาก ATR): ตัวเลขนี้จะถูกนำไปคูณกับค่า ATR เพื่อกำหนดระยะ Take Profit จากราคาเข้า ค่าเริ่มต้นคือ 2.5
การตั้งค่าตาราง (Table Settings)
ตำแหน่งตาราง: ให้คุณสามารถเลือกตำแหน่งที่จะแสดงตารางสรุปผลการดำเนินงานบนหน้าจอได้ (เช่น มุมบนขวา, มุมล่างซ้าย)
Tpsl
[VIP] M3 SMC/ICT Scalp BUY,SELL/TP,SL CK2SMC Scalping Strategy - Promotion
Special Price (Until year-end):
Monthly: $10
Yearly: $50
Lifetime: $100 (Includes free future updates & discounts)
Prices will increase after the promotion.
Contact: condark2@gmail.com or Direct Message.
SMC Scalping Strategy - โปรโมชั่น
ราคาพิเศษ (ถึงสิ้นปีนี้):
รายเดือน: $10
รายปี: $50
ตลอดชีพ: $100 (รวมอัปเดตฟรีและส่วนลดในอนาคต)
ราคาจะปรับขึ้นหลังหมดโปรโมชั่น
ติดต่อ: condark2@gmail.com หรือทักข้อความโดยตรง
User Guide & คู่มือการใช้งาน
This document explains the settings and functions of the M3 SMC/ICT Scalp BUY,SELL/TP,SL CK2 indicator, allowing you to fully customize the strategy to fit your trading style.
**USE M3 For Best Profit**
User Guide
1. Timeframe Settings
Higher Timeframe (HTF) - For Main Structure
This sets the larger timeframe used to determine the main market direction (Order Flow). The strategy will look for trading opportunities on your current chart (LTF) that align with the trend on this HTF.
2. Market Structure Settings
Swing Lookback (HTF & LTF)
Defines the number of candles to the left and right of a pivot point to identify a Swing High or Swing Low. A smaller value makes the detection more sensitive and faster.
BOS/CHoCH Line Color
Customizes the colors for the Break of Structure (trend continuation) and Change of Character (potential reversal) lines on the chart.
3. Filter Settings
Allowed Trading Session
A powerful filter that restricts trades to a specific time window (e.g., London or New York session). The indicator will only look for signals within this defined period.
Volatility Filter (ATR)
Avoids trading in choppy, low-volatility markets. When enabled, it only allows trades if the current Average True Range (ATR) is higher than its moving average, indicating sufficient market movement.
ADX Trend Filter
Measures trend strength. When enabled, it only permits trades if the ADX value is above the set threshold (e.g., 20), ensuring you are trading in a trending market.
DI Cross Filter
Confirms the direction of the trend. It allows long trades only when the +DI line is above the -DI line, and short trades only when -DI is above +DI.
4. Trade Entry & Risk Management
Point of Interest (POI) Type
Allows you to choose the type of zone the strategy will use for entries:
Order Block: The last up/down candle before a strong move.
Fair Value Gap (FVG): A price inefficiency or imbalance.
Wick Zone: A zone created from a liquidity-grabbing candle wick.
Entry Type (Main Strategy)
Defines the exact condition for entering a trade within the selected POI zone, from aggressive (e.g., 25% of Zone) to conservative (e.g., Candle Confirmation).
Enable 'Wait Zone' (Entry on Return)
If enabled, the strategy will wait for the price to leave the POI and then return to it before triggering an entry. This is a more patient approach. If disabled, it will enter as soon as the price touches the POI after the setup is confirmed.
Enable Breakeven Stop Loss
A risk management tool. When a trade reaches a specified R-Multiple profit (e.g., 1R), the stop loss is automatically moved to the entry price, preventing a winning trade from turning into a loss.
Enable Counter-Strategy on TP/SL
An advanced feature that automatically opens a reverse position when a main trade hits its Take Profit or Stop Loss. This can be enabled separately for TP and SL events.
5. Visual Settings
Enable Anticipation Alerts
Solves the problem of late signals. When the script identifies a valid POI, it will alert you immediately, giving you time to prepare for the trade before the price returns to the zone.
คู่มือการใช้งาน (ภาษาไทย)
1. การตั้งค่าไทม์เฟรม (Timeframe Settings)
Higher Timeframe (HTF) - For Main Structure
ใช้สำหรับกำหนดไทม์เฟรมใหญ่เพื่อดูทิศทางหลักของตลาด (Order Flow) โดยกลยุทธ์จะมองหาโอกาสเทรดในไทม์เฟรมปัจจุบัน (LTF) ที่สอดคล้องกับแนวโน้มในไทม์เฟรมใหญ่นี้
2. การตั้งค่าโครงสร้างตลาด (Market Structure Settings)
Swing Lookback (HTF & LTF)
กำหนดจำนวนแท่งเทียนด้านซ้ายและขวาเพื่อใช้ในการระบุจุดสวิง (Swing High/Low) ค่ายิ่งน้อยจะยิ่งไวต่อการเปลี่ยนแปลงของราคา
BOS/CHoCH Line Color
ปรับแต่งสีของเส้นที่ใช้แสดงการทำลายโครงสร้าง (BOS - ไปต่อตามเทรนด์) และการเปลี่ยนลักษณะ (CHoCH - สัญญาณอาจกลับตัว)
3. การตั้งค่าตัวกรอง (Filter Settings)
Allowed Trading Session
ตัวกรองที่ทรงพลังที่สุด ใช้สำหรับจำกัดการเทรดให้อยู่ใน "ช่วงเวลา" ที่กำหนดเท่านั้น (เช่น ช่วงตลาดลอนดอนหรือนิวยอร์ก) อินดิเคเตอร์จะมองหาสัญญาณเฉพาะในกรอบเวลานี้
Volatility Filter (ATR)
หลีกเลี่ยงการเทรดในช่วงที่ตลาดผันผวนต่ำ (Sideways) เมื่อเปิดใช้งาน จะอนุญาตให้เทรดก็ต่อเมื่อค่าความผันผวน (ATR) ปัจจุบันสูงกว่าค่าเฉลี่ยของตัวมันเอง
ADX Trend Filter
ใช้วัดความแข็งแกร่งของแนวโน้ม เมื่อเปิดใช้งาน จะอนุญาตให้เทรดก็ต่อเมื่อค่า ADX สูงกว่าเกณฑ์ที่กำหนด ซึ่งหมายถึงตลาดกำลังมีแนวโน้มที่ชัดเจน
DI Cross Filter
ใช้ยืนยันทิศทางของเทรนด์ โดยจะอนุญาตให้เข้า Long เมื่อเส้น +DI อยู่เหนือ -DI และเข้า Short เมื่อเส้น -DI อยู่เหนือ +DI
4. การตั้งค่าการเข้าเทรดและจัดการความเสี่ยง (Trade Entry & Risk Management)
Point of Interest (POI) Type
ให้คุณเลือก "ประเภทของโซน" ที่จะใช้เป็นจุดรอเข้าเทรดได้:
Order Block: แท่งเทียนสุดท้ายก่อนการเคลื่อนที่รุนแรง (ค่าเริ่มต้น)
Fair Value Gap (FVG): ช่องว่างของราคาที่ตลาดมักกลับมาเติมเต็ม
Wick Zone: โซนที่สร้างจากไส้เทียนที่มีการกวาดสภาพคล่อง
Entry Type (Main Strategy)
กำหนดเงื่อนไขการเข้าเทรดที่แน่นอนภายในโซน POI ที่เลือก มีตั้งแต่แบบดุดัน (เช่น เข้าที่ 25% ของโซน) ไปจนถึงแบบปลอดภัยรอการยืนยัน (เช่น ยืนยันด้วยแท่งเทียน)
Enable 'Wait Zone' (Entry on Return)
หากเปิดใช้งาน สคริปต์จะรอให้ราคาวิ่งออกจากโซนไปก่อน แล้วจึงเข้าเทรดเมื่อราคาวิ่ง "กลับมา" ที่โซนอีกครั้ง เป็นสไตล์การเทรดที่อดทนรอมากขึ้น หากปิด จะเข้าเทรดทันทีที่ราคาเข้ามาในโซน
Enable Breakeven Stop Loss
เครื่องมือจัดการความเสี่ยง เมื่อเทรดของคุณทำกำไรไปถึงระดับ R-Multiple ที่กำหนด (เช่น 1R) สคริปต์จะเลื่อน Stop Loss มาที่จุดคุ้มทุน (ราคาเข้า) โดยอัตโนมัติ เพื่อป้องกันไม่ให้เทรดนั้นกลับมาขาดทุน
Enable Counter-Strategy on TP/SL
ฟีเจอร์ขั้นสูงที่จะเปิดออเดอร์ในทิศทางตรงกันข้ามโดยอัตโนมัติ เมื่อเทรดหลักของคุณชน TP หรือ SL สามารถเลือกเปิด/ปิดแยกกันได้
5. การตั้งค่าการแสดงผล (Visual Settings)
Enable Anticipation Alerts
แก้ปัญหาสัญญาณช้า เมื่อสคริปต์สร้างโซน POI ที่น่าสนใจได้สำเร็จ มันจะ แจ้งเตือนคุณทันที เพื่อให้คุณมีเวลาเตรียมตัวก่อนที่ราคาจะวิ่งกลับมาที่โซน
Pricing & Contact Information
Unlock the full potential of your trading with the SMC Scalping Strategy (V11.2) indicator!
Special Launch Promotion (Until the end of this year!)
Monthly Subscription: $10
Yearly Subscription: $50 (Save $70!)
Lifetime Access: $100 (Best Value!)
Prices will increase after the promotional period ends.
What you get:
Full access to the most advanced SMC Scalping indicator.
Free lifetime updates for all future versions.
Exclusive discounts on new indicators released in the future.
Don't miss this opportunity to elevate your trading game!
Contact for purchase or inquiries:
Email: condark2@gmail.com
Or send a direct message.
ราคาและข้อมูลการติดต่อ
ปลดล็อคศักยภาพการเทรดของคุณเต็มรูปแบบด้วยอินดิเคเตอร์ SMC Scalping Strategy (V11.2)!
โปรโมชั่นพิเศษเปิดตัว (วันนี้ - สิ้นปีนี้เท่านั้น!)
รายเดือน: $10
รายปี: $50 (ประหยัดถึง $70!)
ตลอดชีพ: $100 (คุ้มค่าที่สุด!)
ราคาจะมีการปรับขึ้นหลังสิ้นสุดช่วงโปรโมชั่น
สิ่งที่คุณจะได้รับ:
เข้าถึงอินดิเคเตอร์ SMC Scalping ที่ล้ำสมัยที่สุดได้เต็มทุกฟังก์ชัน
อัปเดตเวอร์ชันใหม่ฟรีตลอดชีพ
รับส่วนลดพิเศษสำหรับอินดิเคเตอร์ใหม่ๆ ที่จะเปิดตัวในอนาคต
อย่าพลาดโอกาสในการยกระดับการเทรดของคุณ!
ติดต่อเพื่อสั่งซื้อหรือสอบถามข้อมูลเพิ่มเติมได้ที่:
อีเมล: condark2@gmail.com
หรือทักข้อความโดยตรง
Random Coin Toss Strategy📌 Overview
This strategy is a probability-based trading simulation that randomly decides trade direction using a coin-toss mechanism and executes trades with a customizable risk-reward ratio. It's designed primarily for testing entry frequency and risk dynamics, not predictive accuracy.
🎯 Core Concept
Every N bars (configurable), the strategy performs a pseudo-random coin toss.
Based on the result:
If heads → Buy
If tails → Sell
Once a position is opened, it sets a Stop-Loss (SL) and Take-Profit (TP) based on a multiple of the current ATR (Average True Range) value.
⚙️ Configurable Inputs
ATR Length Period for ATR calculation, determines volatility basis.
SL Multiplier SL distance = ATR × multiplier (e.g., 1.0 means 1x ATR) .
TP Multiplier TP distance = ATR × multiplier (e.g., 2.0 = 2x ATR) .
Entry Frequency Bars to wait between each new coin toss decision.
Show TP/SL Zones Toggle on/off for drawing visual TP and SL zones.
Box Size Number of bars used to define the width of the TP/SL boxes.
🔁 Entry & Exit Logic
Entry:
Happens only when no current position exists and it's the correct bar interval.
Entry direction is randomly decided.
Exit:
Positions exit at either:
Take-Profit (TP) level
Stop-Loss (SL) level
Both are calculated using the configured ATR-based distances.
🖼️ Visual Features
TP and SL zones:
Rendered as shaded rectangles (boxes) only once per trade.
Green box for TP zone, red box for SL zone.
Automatically deleted and redrawn for each new trade to avoid chart clutter.
ATR Display Table:
A minimal info table at the top-right shows the current ATR value.
Updates every few bars for performance.
🧪 Use Cases
Ideal for risk-reward modeling, strategy prototyping, and understanding how volatility-based SL/TP behavior affects results.
Great for backtesting frequency, RR tweaks (e.g., 2:5 or 3:1), and execution structure in random conditions.
⚠️ Disclaimer
Since the trade direction is random, this script is not meant for predictive trading but serves as a powerful experiment framework for studying how SL, TP, and volatility interact with random chance in a controlled, repeatable system.
[TH] กลยุทธ์ SMC หลายกรอบเวลา (V5.2 - M15 Lead)English Explanation
This Pine Script code implements a multi-timeframe trading strategy based on Smart Money Concepts (SMC). It's designed to identify high-probability trading setups by aligning signals across three different timeframes.
The core logic is as follows:
High Timeframe (HTF) - M15: Determines the overall market direction or bias.
Medium Timeframe (MTF) - M5: Identifies potential Points of Interest (POI), such as Order Blocks or Fair Value Gaps, in alignment with the M15 bias.
Low Timeframe (LTF) - Current Chart: Looks for a specific entry trigger within the M5 POI to execute the trade.
Detailed Breakdown
## Part 1: Inputs & Settings
This section allows you to customize the indicator's parameters:
General Settings:
i_pivotLookback: Sets the lookback period for identifying pivot highs and lows on the LTF, which is crucial for finding the Change of Character (CHoCH).
M15 Bias Settings:
i_m15EmaFast / i_m15EmaSlow: These two EMA (Exponential Moving Average) values on the 15-minute chart determine the main trend. A bullish trend is confirmed when the fast EMA is above the slow EMA, and vice-versa for a bearish trend.
M5 Point of Interest (POI) Settings:
i_showM5Fvg / i_showM5Ob: Toggles the visibility of Fair Value Gaps (FVG) and Order Blocks (OB) on the 5-minute chart. These are the zones where the script will look for trading opportunities.
i_maxPois: Limits the number of POI zones drawn on the chart to keep it clean.
LTF Entry Settings:
i_entryMode:
Confirmation: The script waits for a Change of Character (CHoCH) on the LTF (your current chart) after the price enters an M5 POI. A CHoCH is a break of a recent pivot high (for buys) or pivot low (for sells), suggesting a potential reversal. This is the safer entry method.
Aggressive: The script triggers an entry as soon as the price touches the 50% level of the M5 POI, without waiting for a CHoCH. This is higher risk but can provide a better entry price.
i_showChoch: Toggles the visibility of the CHoCH confirmation lines.
Trade Management Settings:
i_tpRatio: Sets the Risk-to-Reward Ratio (RRR) for the Take Profit target. For example, a value of 2.0 means the Take Profit distance will be twice the Stop Loss distance.
i_slMode: (New in V5.2) Provides four different methods to calculate the Stop Loss:
POI Zone (Default): Places the SL at the outer edge of the M5 POI zone.
Last Swing: Places the SL at the most recent LTF swing high/low before the entry.
ATR: Uses the Average True Range (ATR) indicator to set a volatility-based SL.
Previous Candle: Places the SL at the high or low of the candle immediately preceding the entry. This is the tightest and riskiest option.
i_maxHistory: Sets the number of past trades to display on the chart.
## Part 2: Data Types & Variables
This section defines custom data structures (type) to organize information:
Poi: A structure to hold all information related to a single Point of Interest, including its price boundaries, direction (bullish/bearish), and whether it has been mitigated (touched by price).
Trade: A structure to store details for each trade, such as its entry price, SL, TP, result (Win/Loss/Active), and chart objects for drawing.
## Part 3: Core Logic & Calculations
This is the engine of the indicator:
Data Fetching: It uses request.security to pull EMA data from the M15 timeframe and candle data (high, low, open, close) from the M5 timeframe.
POI Identification: The script constantly scans the M5 data for FVG and OB patterns. When a valid pattern is found that aligns with the M15 bias (e.g., a bullish OB during an M15 uptrend), it's stored as a Poi and drawn on the chart.
Entry Trigger:
It checks if the price on the LTF enters a valid (unmitigated) POI zone.
Based on the selected i_entryMode, it either waits for a CHoCH or enters aggressively.
Once an entry condition is met, it calculates the SL based on the i_slMode, calculates the TP using the i_tpRatio, and creates a new Trade.
Trade Monitoring: For every active trade, the script checks on each new bar if the price has hit the SL or TP level. When it does, the trade's result is updated, and the visual boxes are finalized.
## Part 5: On-Screen Display
This part creates the Performance Dashboard table shown on the top-right of the chart. It provides a real-time summary of:
M15 Bias: Current market direction.
Total Trades: The total number of completed trades from the history.
Win Rate: The percentage of winning trades.
Total R-Multiple: The cumulative Risk-to-Reward multiple (sum of RRR from wins minus losses). A positive value indicates overall profitability.
🇹🇭 คำอธิบายและข้อแนะนำภาษาไทย
สคริปต์นี้เป็น Indicator สำหรับกลยุทธ์การเทรดแบบ Smart Money Concepts (SMC) ที่ใช้การวิเคราะห์จากหลายกรอบเวลา (Multi-Timeframe) เพื่อหาจุดเข้าเทรดที่มีความเป็นไปได้สูง
หลักการทำงานของ Indicator มีดังนี้:
Timeframe ใหญ่ (HTF) - M15: ใช้กำหนดทิศทางหลักของตลาด หรือ "Bias"
Timeframe กลาง (MTF) - M5: ใช้หาโซนสำคัญ หรือ "Point of Interest (POI)" เช่น Order Blocks หรือ Fair Value Gaps ที่สอดคล้องกับทิศทางจาก M15
Timeframe เล็ก (LTF) - กราฟปัจจุบัน: ใช้หาสัญญาณยืนยันเพื่อเข้าเทรดในโซน POI ที่กำหนดไว้
รายละเอียดของโค้ด
## ส่วนที่ 1: การตั้งค่า (Inputs & Settings)
ส่วนนี้ให้คุณปรับแต่งค่าต่างๆ ของ Indicator ได้:
การตั้งค่าทั่วไป:
i_pivotLookback: กำหนดระยะเวลาที่ใช้มองหาจุดกลับตัว (Pivot) ใน Timeframe เล็ก (LTF) เพื่อใช้ยืนยันสัญญาณ Change of Character (CHoCH)
การตั้งค่า M15 (ทิศทางหลัก):
i_m15EmaFast / i_m15EmaSlow: ใช้เส้น EMA 2 เส้นบน Timeframe 15 นาที เพื่อกำหนดเทรนด์หลัก หาก EMA เร็วอยู่เหนือ EMA ช้า จะเป็นเทรนด์ขาขึ้น และในทางกลับกัน
การตั้งค่า M5 (จุดสนใจ - POI):
i_showM5Fvg / i_showM5Ob: เปิด/ปิด การแสดงโซน Fair Value Gaps (FVG) และ Order Blocks (OB) บน Timeframe 5 นาที ซึ่งเป็นโซนที่สคริปต์จะใช้หาโอกาสเข้าเทรด
i_maxPois: จำกัดจำนวนโซน POI ที่จะแสดงผลบนหน้าจอ เพื่อไม่ให้กราฟดูรกเกินไป
การตั้งค่า LTF (การเข้าเทรด):
i_entryMode:
ยืนยัน (Confirmation): เป็นโหมดที่ปลอดภัยกว่า โดยสคริปต์จะรอให้เกิดสัญญาณ Change of Character (CHoCH) ใน Timeframe เล็กก่อน หลังจากที่ราคาเข้ามาในโซน POI แล้ว
เชิงรุก (Aggressive): เป็นโหมดที่เสี่ยงกว่า โดยสคริปต์จะเข้าเทรดทันทีที่ราคาแตะระดับ 50% ของโซน POI โดยไม่รอสัญญาณยืนยัน CHoCH
i_showChoch: เปิด/ปิด การแสดงเส้น CHoCH บนกราฟ
การตั้งค่าการจัดการเทรด:
i_tpRatio: กำหนด อัตราส่วนกำไรต่อความเสี่ยง (Risk-to-Reward Ratio) เพื่อตั้งเป้าหมายทำกำไร (Take Profit) เช่น 2.0 หมายถึงระยะทำกำไรจะเป็น 2 เท่าของระยะตัดขาดทุน
i_slMode: (ฟีเจอร์ใหม่ V5.2) มี 4 รูปแบบในการคำนวณ Stop Loss:
โซน POI (ค่าเริ่มต้น): วาง SL ไว้ที่ขอบนอกสุดของโซน POI
Swing ล่าสุด: วาง SL ไว้ที่จุด Swing High/Low ล่าสุดของ Timeframe เล็ก (LTF) ก่อนเข้าเทรด
ATR: ใช้ค่า ATR (Average True Range) เพื่อกำหนด SL ตามระดับความผันผวนของราคา
แท่งเทียนก่อนหน้า: วาง SL ไว้ที่ราคา High/Low ของแท่งเทียนก่อนหน้าที่จะเข้าเทรด เป็นวิธีที่ SL แคบและเสี่ยงที่สุด
i_maxHistory: กำหนดจำนวนประวัติการเทรดที่จะแสดงย้อนหลังบนกราฟ
## ส่วนที่ 2: ประเภทข้อมูลและตัวแปร
ส่วนนี้เป็นการสร้างโครงสร้างข้อมูล (type) เพื่อจัดเก็บข้อมูลให้เป็นระบบ:
Poi: เก็บข้อมูลของโซน POI แต่ละโซน เช่น กรอบราคาบน-ล่าง, ทิศทาง (ขึ้น/ลง) และสถานะว่าถูกใช้งานไปแล้วหรือยัง (Mitigated)
Trade: เก็บรายละเอียดของแต่ละการเทรด เช่น ราคาเข้า, SL, TP, ผลลัพธ์ (Win/Loss/Active) และอ็อบเจกต์สำหรับวาดกล่องบนกราฟ
## ส่วนที่ 3: ตรรกะหลักและการคำนวณ
เป็นหัวใจสำคัญของ Indicator:
ดึงข้อมูลข้าม Timeframe: ใช้ฟังก์ชัน request.security เพื่อดึงข้อมูล EMA จาก M15 และข้อมูลแท่งเทียนจาก M5 มาใช้งาน
ระบุ POI: สคริปต์จะค้นหา FVG และ OB บน M5 ตลอดเวลา หากเจ้ารูปแบบที่สอดคล้องกับทิศทางหลักจาก M15 (เช่น เจอ Bullish OB ในขณะที่ M15 เป็นขาขึ้น) ก็จะวาดโซนนั้นไว้บนกราฟ
เงื่อนไขการเข้าเทรด:
เมื่อราคาใน Timeframe เล็ก (LTF) วิ่งเข้ามาในโซน POI ที่ยังไม่เคยถูกใช้งาน
สคริปต์จะรอสัญญาณตาม i_entryMode ที่เลือกไว้ (รอ CHoCH หรือเข้าแบบ Aggressive)
เมื่อเงื่อนไขครบ จะคำนวณ SL และ TP จากนั้นจึงบันทึกการเทรดใหม่
ติดตามการเทรด: สำหรับเทรดที่ยัง "Active" อยู่ สคริปต์จะคอยตรวจสอบทุกแท่งเทียนว่าราคาไปถึง SL หรือ TP แล้วหรือยัง เมื่อถึงจุดใดจุดหนึ่ง จะบันทึกผลและสิ้นสุดการวาดกล่องบนกราฟ
## ส่วนที่ 5: การแสดงผลบนหน้าจอ
ส่วนนี้จะสร้างตาราง "Performance Dashboard" ที่มุมขวาบนของกราฟ เพื่อสรุปผลการทำงานแบบ Real-time:
M15 Bias: แสดงทิศทางของตลาดในปัจจุบัน
Total Trades: จำนวนเทรดทั้งหมดที่เกิดขึ้นในประวัติ
Win Rate: อัตราชนะ คิดเป็นเปอร์เซ็นต์
Total R-Multiple: ผลตอบแทนรวมจากความเสี่ยง (R) ทั้งหมด (ผลรวม RRR ของเทรดที่ชนะ ลบด้วยจำนวนเทรดที่แพ้) หากเป็นบวกแสดงว่ามีกำไรโดยรวม
📋 ข้อแนะนำในการใช้งาน
Timeframe ที่เหมาะสม: Indicator นี้ถูกออกแบบมาให้ใช้กับ Timeframe เล็ก (LTF) เช่น M1, M3 หรือ M5 เนื่องจากมันดึงข้อมูลจาก M15 และ M5 มาเป็นหลักการอยู่แล้ว
สไตล์การเทรด:
Confirmation: เหมาะสำหรับผู้ที่ต้องการความปลอดภัยสูง รอการยืนยันก่อนเข้าเทรด อาจจะตกรถบ้าง แต่ลดความเสี่ยงจากการเข้าเทรดเร็วเกินไป
Aggressive: เหมาะสำหรับผู้ที่ยอมรับความเสี่ยงได้สูงขึ้น เพื่อให้ได้ราคาเข้าที่ดีที่สุด
การเลือก Stop Loss:
"Swing ล่าสุด" และ "โซน POI" เป็นวิธีมาตรฐานตามหลัก SMC
"ATR" เหมาะกับตลาดที่มีความผันผวนสูง เพราะ SL จะปรับตามสภาพตลาด
"แท่งเทียนก่อนหน้า" เป็นวิธีที่เสี่ยงที่สุด เหมาะกับการเทรดเร็วและต้องการ RRR สูงๆ แต่ก็มีโอกาสโดน SL ง่ายขึ้น
การบริหารความเสี่ยง: Indicator นี้เป็นเพียง เครื่องมือช่วยวิเคราะห์ ไม่ใช่สัญญาณซื้อขายอัตโนมัติ 100% ผู้ใช้ควรมีความเข้าใจในหลักการของ SMC และทำการบริหารความเสี่ยง (Risk Management) อย่างเคร่งครัดเสมอ
การทดสอบย้อนหลัง (Backtesting): ควรทำการทดสอบ Indicator กับสินทรัพย์และตั้งค่าต่างๆ เพื่อให้เข้าใจลักษณะการทำงานและประสิทธิภาพของมันก่อนนำไปใช้เทรดจริง
Uptrick: Imbalance MA Trailing System
### **Overview**
The "Uptrick: Imbalance MA Trailing System" is a complex trading indicator designed to help traders identify potential bullish and bearish imbalances in the market, coupled with a trailing stop mechanism to manage trades. The indicator uses a combination of moving averages, Average True Range (ATR), and custom logic to detect trading signals and plot various levels on the chart to assist traders in making informed decisions.
### **Key Components and Functionality**
#### 1. **Inputs and Configuration**
- **Imbalance Filter (`imbalanceFilter`)**: This input sets the filter for detecting imbalances based on the difference between two price points. The value is a float and can be adjusted to fine-tune the sensitivity of imbalance detection. The default value is `0.0`, with a step size of `0.1`.
- **Moving Average Settings (`maLength1`, `maLength2`, `maColor1`, `maColor2`)**:
- `maLength1` and `maLength2` define the lengths of the two moving averages used in the indicator. By default, they are set to `50` and `200` periods, respectively.
- `maColor1` and `maColor2` specify the colors of these moving averages on the chart. The first MA is colored blue, and the second is red.
- **Take Profit and Stop Loss Settings (`displayTP`, `tpMultiplier`, `tpColor`, `displaySL`, `slMultiplier`, `slColor`)**:
- `displayTP` and `displaySL` are boolean inputs that control whether the TP and SL areas are displayed on the chart.
- `tpMultiplier` and `slMultiplier` are multipliers used to calculate the TP and SL levels relative to the detected imbalance level using the ATR value.
- `tpColor` and `slColor` define the colors of these areas. The TP area is green (with a transparency of 50), and the SL area is red (with a transparency of 50).
- **Trailing Stop Settings (`trailMultiplier`)**: This setting determines the multiplier used to calculate the trailing stop level based on the ATR value. The default multiplier is `2.5`.
- **Style Settings (`bullishColor`, `bearishColor`)**:
- `bullishColor` and `bearishColor` set the colors for bullish and bearish zones created when an imbalance is detected. The bullish zone is green, and the bearish zone is red.
- **Signal Label Size (`labelSizeOption`)**: The size of the signal labels displayed on the chart can be adjusted. The options include `Tiny`, `Small`, `Normal`, `Large`, and `Huge`. The selected size affects the visual prominence of the labels.
#### 2. **ATR Calculation (`atrValue`)**
- The ATR value is calculated using a period of 14, which is a standard setting for measuring market volatility. This value is used extensively throughout the indicator to calculate TP, SL, and trailing stop levels.
#### 3. **Imbalance Detection and Zone Creation**
- The indicator detects potential imbalances in the market by comparing certain price points, using a custom function (`imbalanceCondition`).
- **Bullish Imbalance Detection (`bullishSignal`)**:
- A bullish imbalance is detected when the low of three bars ago is higher than the high of one bar ago, and the current close is above the low of three bars ago.
- Additional conditions include checking that the current close is above the calculated average of the two moving averages (`ma1` and `ma2`), and that the imbalance exceeds the threshold set by the `imbalanceFilter`.
- **Bearish Imbalance Detection (`bearishSignal`)**:
- A bearish imbalance is detected under conditions where the low of one bar ago is higher than the high of three bars ago, and the current close is below the high of three bars ago.
- Like the bullish signal, the close must also be below the average of the two moving averages, and the imbalance must exceed the `imbalanceFilter` threshold.
- Upon detection of an imbalance (either bullish or bearish), the indicator creates a zone using `box.new` that highlights the price range of the imbalance. The box color corresponds to the bullish or bearish nature of the signal.
- The center of the imbalance range is marked with a dashed line, and a corresponding label (`🔴` for bearish and `🟢` for bullish) is placed on the chart to indicate the detected signal.
#### 4. **Take Profit and Stop Loss Calculation (`calculateTPSL`)**
- When an imbalance is detected, the indicator calculates potential TP and SL levels based on the ATR value and the respective multipliers.
- If the TP or SL areas are enabled, the indicator plots these areas as colored boxes on the chart.
- The function also tracks whether these levels are hit by subsequent price action, updating the status (`reached`) as appropriate.
#### 5. **Trailing Stop Logic (`applyTrailingStop`)**
- The trailing stop feature is a dynamic mechanism that adjusts the stop level as the price moves in the trader's favor.
- The trailing stop is calculated using the ATR value multiplied by the `trailMultiplier`.
- If the trailing stop is triggered (i.e., the price crosses the trailing stop level), the indicator marks the trade as stopped out.
#### 6. **Plotting and Visualization**
- The indicator plots the two moving averages on the chart with the specified colors and line width.
- If a trailing stop is active, it plots the trailing stop level on the chart, updating as the stop moves.
- The bar color changes based on the status of the current signal and whether the trailing stop or TP/SL levels have been hit.
### **Detailed Execution Flow**
1. **Initialization**: The indicator initializes several variables, including lines, boxes, and the current signal state. This setup ensures that the script can dynamically update these elements as new price data comes in.
2. **Moving Average Calculation**: The moving averages (`ma1` and `ma2`) are calculated using simple moving average (SMA) functions, which are foundational for many of the indicator's conditions.
3. **Imbalance Detection**: The script evaluates price action to detect potential bullish or bearish imbalances, applying filters based on the user-defined `imbalanceFilter`.
4. **Zone Creation and Labeling**: Upon detecting an imbalance, the script creates visual zones on the chart using the `box.new` function and labels the zones for easy identification.
5. **Take Profit and Stop Loss Logic**: The TP and SL areas are calculated and plotted if the relevant settings are enabled. The script continuously checks if these levels are reached as new bars form.
6. **Trailing Stop Calculation**: The script dynamically adjusts the trailing stop level based on the price movement and ATR value. The trailing stop helps lock in profits as the trade progresses.
7. **Plotting**: The moving averages, trailing stop levels, and bar colors are plotted on the chart, providing a visual representation of the indicator's signals and trade management levels.
8. **Final Checks and Updates**: The script concludes each bar's processing by updating the status of various elements, such as whether levels have been reached or if the trailing stop has been triggered.
### **Conclusion**
The "Uptrick: Imbalance MA Trailing System" is a highly versatile indicator designed for traders who want to identify market imbalances and manage their trades effectively using a combination of moving averages, ATR-based calculations, and custom logic. The indicator offers a wide range of customization options, allowing traders to adjust the sensitivity of imbalance detection, the size of the signal labels, and the visibility of various trade management levels (TP, SL, and trailing stop).
The combination of these features makes it a powerful tool for both novice and experienced traders, providing clear visual cues and robust trade management capabilities directly on the chart.
Macro Score - Dem. Fib. McGinley DynamicsA "macro score", as defined here, is created by giving various weights to different signals and adding them together to get one smooth score. Positive or negative values are assigned to each of the signals depending on if the statement is true or false (e.g. DPO > 0: +1, DPO < 0: -1). This manner of strategy allows for a subset of the available signals to be present at one time as opposed to every technical signal having to be active in order for a long/short signal to trigger.
The DFMG - Democratic Fibonacci McGinley Dynamic - is a separate indicator that we have released that takes 10 different Fibonacci McGinley Dynamics (lengths of 3 to 233, at Fibonacci intervals) and averages them to form the DFMG line. This helps by creating a consensus on the trend based on these dynamic lines alone. Crossovers of the DFMG with the various McGinley lengths as well as a cross of the price source and these lines can provide adequate long and short signals.
This strategy has the signals and weights pre-determined in the code. Heaviest weights have been given to crosses of the DFMG line/McGinley(233) as well as the crosses of the McGinley(3)/DFMG. Additionally, there are thresholds for DPO ( Detrended Price Oscillator , above or below 0), CMO ( Chande Momentum Oscillator , above or below 0), Jurik Volatility Bands (above or below 0), and Stoch RSI (above or below 50). These four signals hold a lighter weight than the McGinley cross signals.
The macro score itself is printed in an underlay as a white line that goes between -10 and 10 for this strategy. In addition to the macro score line, a green momentum line (sourced by the macro score itself) has been included. A crossover/crossunder of the macro score and the macro momentum line is included into the long/short signal syntax in addition to long and short thresholds for the macro score, defaulted to 5 and -5 respectively.
Take profit, stop loss, and trailing percentages are also included, found at the bottom of the Input tab under “TT and TTP” as well as “Stop Loss”. Make sure to understand the TP/SL ratio that you desire before use, as the desired hit rate/profitability percentage will be affected accordingly. The option for adding in a trailing stop has also been included, with options to choose between an ATR-based trail or a percentage-based trail.
This strategy does NOT guarantee future returns. Apply caution in trading regardless of discretionary or algorithmic. Understand the concepts of risk/reward and the intricacies of each strategy choice before utilizing them in your personal trading.
Profitview/Pineconnector Settings:
If you wish to utilize Profitview’s automation system, find the included “Profitview Settings” under the Input tab of the strategy settings menu. If not, skip this section entirely as it can be left blank. Options will be “OPEN LONG TITLE”, “OPEN SHORT TITLE”, “CLOSE LONG TITLE”, and “CLOSE SHORT TITLE”. If you wished to trade SOL, for example, you would put “SOL LONG”, “SOL SHORT”, “SOL CLOSE LONG”, and “SOL CLOSE SHORT” in these areas. Within your Profitview extension, ensure that your Alerts all match these titles. To set an alert for use with Profitview, go to the “Alerts” tab in TradingView, then create an alert. Make sure that your desired asset and timeframe are currently displayed on your screen when creating the alert. Under the “Condition” option of the alert, select the strategy, then select the expiration time. If using TradingView Premium, this can be open-ended. Otherwise, select your desired expiration time and date. This can be updated whenever desired to ensure the strategy does not expire. Under “Alert actions”, nothing necessarily needs to be selected unless so desired. Leave the “Alert name” option empty. For the “Message”, delete the generated message and replace it with {{strategy.order.alert_message}} and nothing else. If using Pineconnector, follow the same directions for setting up an alert, but use the " ,buy, ,risk=" syntax as noted in the tooltips.
Default Properties for AVAX 20M:
DPO - 35 , uncentered
CMO - 25, open
K/D - 3/3
RSI Stoch Length - 3
Stoch Length - 4
Stoch Source - open
JVB Length - 14
JVB Smoothing - 2
DFMG source - close
Macro Length - 14
TP % - 1.5%
TTP % - 0.005%
SL % - 1.8%, no trail
X48 - Strategy | MA Type Cross + TPSL | Future&Spot | V.2Thank You For Open Source Code, This Strategy Ref. By 1.Simple Strategy Like MA Crossover For Long/Short or Spot Trade, 2. CDC Action Zone V.2 for BarPaint
This Strategy Mixing With MA Crossover Strategy and BarPaint By CDC Action Zone and TP/SL by Varbara
### How To Use Strategy : Setting EMA/SMA Crossover EMA/SMA, Any Value If You Want
For Long Position : Cross Up
For Short Position : Cross Down
Can Use With Spot Trade : Cross Up = Buy, Cross Down = Sell
TP/SL When Your OrderSize Change From any % Of Your TP/SL Value
### In Strategy Setting
Intitial Capital = Ex. 200
Order Size = Should Be Money Management Not Use 100% of Capital Ex. 10% of Capital (200$) = Order Size 20$
StopLoss and Take Profit = If You Run Trend TF 4H+ or 1D+ You Can Change TP% = 1,000% for nonlimit and Stop Loss 5 - 20% from your order size
Ex. Stoploss 15% = OrderSize / 100 x %SL = 20$/100 x 15% = 3$ Loss from order size 20$ (if you not set stop loss.)
Base Currency = (Your Currency) # Ex. USD
Commission = (Your Trading Fee) # Ex. Future Fee Can Check At Binance Fee Rate > www.binance.com > Choose Your Fee Type, Ex. USD M Future (Regular User) = 0.02 (Maker), 0.04 (Taker)
Commission Symbol Type = % # (Ref. By Binance Fee Rate)
### Notice ####
Default Setting It's Realistic From Normal Life Ex. Capital 200$ / Ordersize 20$ (10%)/ Commission 0.1% (Buy+Sell) / Slippage = 2 / TP = 1000% (nonlimit) / SL = 15%/OrderSize
Low Risk But High Return, Good Luck
### Bot Auto Trade by X4815162342 ###
if you wanna try my bot auto trade X48-3in1-bot : Contact My Line ID : x4815x
Full Command Alert For This Strategy If You Wanna See It's
'{"ex":"'+markettype+'","side": "'+longcommand+'", "amount": "@{{strategy.order.contracts}}", "symbol": "{{ticker}}", "passphrase": "'+passphrase+'","leverage":"'+str.tostring(leveragex)+'"}'
'{"ex":"'+markettype+'","side": "'+shortcommand+'", "amount": "@{{strategy.order.contracts}}", "symbol": "{{ticker}}", "passphrase": "'+passphrase+'","leverage":"'+str.tostring(leveragex)+'"}'
But Easy Than Full Command Just Use Thisssssss !! Strategy Be Manage Auto Long and Short or TPSL Position
You Don't Do Anything Just Use This Message to Alerts Message
{{strategy.order.alert_message}}
### If you don't use bot but just looking for strategy test ####
Just Pass Bot Setting Function It's Nothing Effect For Strategy !!!!!!
Let's Enjoy With Your Strategy BackTest 😁
Remember Beware Max drawdown%. I'm Recommend Lower Than 10% It's Very Good.
EURUSD 5min london session strategyHey, today I bring you another strategy that I pull up together.
Its a KISS system ( keep it stupid simple )
We have 2 ma of 5 lenght each, one applied to the high and the other to low. With this we create a channel.
If the candle close above or below the channel we got a signal. Then we can optionally verify with the RSI to increase our chances.
At the same time, this system, only trades during the london session ( can be changed), and it has 2 rules, preferably no more than 5 trades / day, and no more than 2% risk of equity lost .
We also have a TP/SL system made of pips.
Enjoy it.