Ticker

6/recent/ticker-posts

Advertisement

Responsive Advertisement

CRUDE OIL Breakout Strategy Trading view code version 6

 CRUDE OIL




இந்த Breakout Strategy மூலம் Crude Oil (MCX) வர்த்தகம் செய்யும் எளிய வழிமுறைகள்:

1. நேற்றைய 30 நிமிட 3 கேண்டில் அளவுகள் (Previous Day Levels)

  • நேற்றைய வர்த்தகத்தின் கடைசி 30 நிமிட 3 கேண்டில்களை கவனிக்க வேண்டும்.

  • அந்த 3 கேண்டில்களின் மிக உயர்ந்த விலை (High) மற்றும் மிக குறைந்த விலை (Low) ஆகியவற்றைக் குறித்துக்கொள்ள வேண்டும்.

  • இவையே நேற்றைய முக்கிய High (PDH) & Low (PDL) அளவுகளாகும்.

2. இன்றைய 1:30 PM கேண்டில் அளவுகள் (Today 1:30 PM Level)

  • இன்று மதியம் 1:30 PM முதல் 2:00 PM வரையிலான 30-நிமிட கேண்டில் முடியும் வரை காத்திருக்க வேண்டும்.

  • 2:00 மணிக்கு அந்த கேண்டில் முடிந்ததும், அதன் High மற்றும் Low அளவுகளைக் குறித்துக்கொள்ள வேண்டும் (எங்கள் Indicator இதை தானாகவே Orange நிறத்தில் காட்டும்).

3. Breakout வர்த்தக விதிகள் (Trading Rules)

சிக்னல் (Signal)எப்போது நுழைய வேண்டும்? (Entry)இலக்கு (Target)ஸ்டாப் லாஸ் (Stop Loss)
BUY (Bullish)ஒரு 30m கேண்டில் 1:30 PM High-க்கு மேலே மூடும் போது (Close).+25 முதல் 40 புள்ளிகள் அல்லது அடுத்த ResistanceBreakout கேண்டிலின் Low அல்லது 1:30 PM Low
SELL (Bearish)ஒரு 30m கேண்டில் 1:30 PM Low-க்கு கீழே மூடும் போது (Close).+25 முதல் 40 புள்ளிகள் அல்லது அடுத்த SupportBreakout கேண்டிலின் High அல்லது 1:30 PM High
முக்கிய குறிப்புகள்:

  • Candle Body Close: கேண்டிலின் Wick (கீற்று) மட்டும் தாண்டினால் Trade எடுக்கக் கூடாது. கேண்டிலின் உடற்பகுதி (Body) முழுமையாக 1:30 PM High/Low-க்கு வெளியே முடிய வேண்டும்.

  • Trend Confirmation: 1:30 PM Breakout-ம், நேற்றைய 3-கேண்டில் Breakout-ம் ஒரே திசையில் (Up/Down) இருந்தால் அது மிக வலுவான என்ட்ரி (Strong Signal) தரும்.

  • Avoid Big Range: 1:30 PM கேண்டில் மிகப் பெரிய அளவாக (35-40 புள்ளிகளுக்கு மேல்) இருந்தால் Risk அதிகம் என்பதால் அந்த Trade-ஐ தவிர்க்கலாம்.

JUST COPY PASTE NO

//@version=6
indicator("MTF Crude Oil 30m Breakout & Dynamic Table", overlay=true)

// ==========================================
// 1. Force 30-Minute Timeframe Calculations
// ==========================================
// Function to capture Yesterday's Last 3 Candles High/Low on 30m TF
f_ydLast3() =>
    var float hVal = na
    var float lVal = na
    if ta.change(time("D")) != 0
        hVal := math.max(high[1], high[2], high[3])
        lVal := math.min(low[1], low[2], low[3])
    [hVal, lVal]

// Function to capture 1:30 PM (13:30) Candle High/Low on 30m TF
f_1330Candle() =>
    var float h1330 = na
    var float l1330 = na
    if (hour == 13 and minute == 30)
        h1330 := high
        l1330 := low
    [h1330, l1330]

// Fetch 30-minute data dynamically regardless of current chart timeframe
[ydLast3High, ydLast3Low]   = request.security(syminfo.tickerid, "30", f_ydLast3(), barmerge.gaps_off, barmerge.lookahead_on)
[today1330High, today1330Low] = request.security(syminfo.tickerid, "30", f_1330Candle(), barmerge.gaps_off, barmerge.lookahead_on)

// ==========================================
// 2. Plot Continuous Multi-Timeframe Level Lines
// ==========================================
plot(ydLast3High, title="Custom Multi-Timeframe Breakout:Prev Day High Line", color=color.green, linewidth=2)
plot(ydLast3Low,  title="Custom Multi-Timeframe Breakout:Prev Day Low Line",  color=color.red,   linewidth=2)

plot(today1330High, title="30M 1:30 PM High:30M 1:30 High", color=color.green, linewidth=2)
plot(today1330Low,  title="30M 1:30 PM Low:30M 1:30 Low",   color=color.red,   linewidth=2)

// ==========================================
// 3. Breakout Triggers & Visual Signals
// ==========================================
after1330 = (hour > 13) or (hour == 13 and minute >= 30)

buySignal  = after1330 and not na(today1330High) and ta.crossover(close, today1330High)
sellSignal = after1330 and not na(today1330Low) and ta.crossunder(close, today1330Low)

// Buy / Sell Tag Labels on Candles
plotshape(buySignal,  title="BUY Signal",  style=shape.labelup,   location=location.belowbar, color=color.green, text="BUY",  textcolor=color.white, size=size.small)
plotshape(sellSignal, title="SELL Signal", style=shape.labeldown, location=location.abovebar, color=color.red,   text="SELL", textcolor=color.white, size=size.small)

// Background Highlights
bgcolor(buySignal ? color.new(color.green, 85) : na)
bgcolor(sellSignal ? color.new(color.red, 85) : na)

// ==========================================
// 4. Dynamic On-Screen Table Dashboard
// ==========================================
var table infoTable = table.new(position = position.top_right, columns = 3, rows = 4, bgcolor = color.new(color.black, 20), border_color = color.gray, border_width = 1)

if barstate.islast
    // Header Row
    table.cell(infoTable, 0, 0, "Level Type", bgcolor = color.navy, text_color = color.white, text_size = size.small)
    table.cell(infoTable, 1, 0, "High Level", bgcolor = color.navy, text_color = color.white, text_size = size.small)
    table.cell(infoTable, 2, 0, "Low Level", bgcolor = color.navy, text_color = color.white, text_size = size.small)

    // Row 1: Yesterday's Last 3 Candles (30m)
    table.cell(infoTable, 0, 1, "Yd Last 3 (30m)", text_color = color.yellow, text_size = size.small)
    table.cell(infoTable, 1, 1, not na(ydLast3High) ? str.tostring(ydLast3High, "#.##") : "Calculating...", text_color = color.green, text_size = size.small)
    table.cell(infoTable, 2, 1, not na(ydLast3Low) ? str.tostring(ydLast3Low, "#.##") : "Calculating...", text_color = color.red, text_size = size.small)

    // Row 2: Today 1:30 PM Candle (30m)
    table.cell(infoTable, 0, 2, "Today 1:30 PM (30m)", text_color = color.yellow, text_size = size.small)
    table.cell(infoTable, 1, 2, not na(today1330High) ? str.tostring(today1330High, "#.##") : "Waiting...", text_color = color.green, text_size = size.small)
    table.cell(infoTable, 2, 2, not na(today1330Low) ? str.tostring(today1330Low, "#.##") : "Waiting...", text_color = color.red, text_size = size.small)

    // Row 3: Current Status
    string statusText = "NO SIGNAL"
    color statusBgColor = color.gray
    
    if not na(today1330High) and close > today1330High
        statusText := "BULLISH BREAKOUT (BUY)"
        statusBgColor := color.green
    else if not na(today1330Low) and close < today1330Low
        statusText := "BEARISH BREAKOUT (SELL)"
        statusBgColor := color.red
    else if na(today1330High)
        statusText := "WAITING FOR 1:30 PM"
        statusBgColor := color.orange
    else
        statusText := "INSIDE RANGE"
        statusBgColor := color.gray

    table.cell(infoTable, 0, 3, "Signal Status", text_color = color.white, text_size = size.small)
    table.cell(infoTable, 1, 3, statusText, bgcolor = statusBgColor, text_color = color.white, text_size = size.small)
    table.cell(infoTable, 2, 3, "LTP: " + str.tostring(close, "#.##"), text_color = color.white, text_size = size.small)

Post a Comment

0 Comments