İş tamamlandı
Tamamlanma süresi: 225 gün
İş Gereklilikleri
here is the script its small
//@version=5
strategy("US500 Trading Strategy", overlay=true, initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=1000)
// Input parameters
sma14 = ta.sma(close, 14)
sma50 = ta.sma(close, 50)
sma100 = ta.sma(close, 100)
// Function to check if SMA100 is in a distinct trend
isDistinctTrend(len) =>
uptrend = true
downtrend = true
for i = 0 to len - 1
if sma100[i] <= sma100[i+1]
uptrend := false
if sma100[i] >= sma100[i+1]
downtrend :=//@version=5
false
[uptrend, downtrend]
[distinctUptrend, distinctDowntrend] = isDistinctTrend(10)
// Fibonacci levels
high_12h = ta.highest(high, 720)
low_12h = ta.lowest(low, 720)
fib_range = high_12h - low_12h
upper_15_percent = high_12h - fib_range * 0.15
lower_15_percent = low_12h + fib_range * 0.15
// Check if price is within top or bottom 15% of Fibonacci range
inFibZone = close > upper_15_percent or close < lower_15_percent
// New high/low condition
newHigh = ta.highest(high, 60) == high
newLow = ta.lowest(low, 60) == low
retraceAfterHigh = newHigh and high - low < 4
retraceAfterLow = newLow and high - low < 4
// Flat range condition
flatRange = math.abs(sma100 - sma50) < 4 and math.abs(ta.change(sma100)) < 0.1 and math.abs(ta.change(sma50)) < 0.1
// Entry conditions
longCondition = ta.crossover(sma14, sma50) and distinctUptrend and not inFibZone and not retraceAfterHigh and not flatRange
shortCondition = ta.crossunder(sma14, sma50) and distinctDowntrend and not inFibZone and not retraceAfterLow and not flatRange
// Override condition
longOverride = flatRange and close > sma100 and close > sma14
shortOverride = flatRange and close < sma100 and close < sma14
// Calculate position size
position_size = math.round(strategy.equity * 0.01)
// PineConnector Inputs
PC_ID = input.string("7531755372757", title = "ID Pineconnector", group="PineConnector")
inputsym = input.string("US500", title = "Ticker", group="PineConnector")
PC_RISK = input.float(1, "Risk Contracts/Equity", group="PineConnector")
PC_LIMIT = input.bool(true, "Use Market Order", group="PineConnector")
PC_LIMIT_PIPS = input.float(5, "Lots Limit Order Distance", group="PineConnector")
// Execute trades
if longCondition or longOverride
strategy.entry("Long", strategy.long, qty=position_size, alert_message = str.tostring(PC_ID)+',buy,'+inputsym+ ',risk='+str.tostring(PC_RISK))
if shortCondition or shortOverride
strategy.entry("Short", strategy.short, qty=position_size,alert_message = str.tostring(PC_ID)+',sell,'+inputsym+ ',risk='+str.tostring(PC_RISK))
// Stop loss and take profit management
strategy.exit("Long SL/TP", "Long", stop=strategy.position_avg_price * 0.9825, trail_points=100, trail_offset=35, alert_message =str.tostring(PC_ID)+',closelong,'+inputsym)
strategy.exit("Short SL/TP", "Short", stop=strategy.position_avg_price * 1.0175, trail_points=100, trail_offset=35, alert_message = str.tostring(PC_ID)+',closeshort,'+inputsym)
// Plot SMAs
plot(sma14, color=color.blue, title="SMA 14")
plot(sma50, color=color.red, title="SMA 50")
plot(sma100, color=color.green, title="SMA 100")
Yanıtlandı
1
Derecelendirme
Projeler
105
60%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
2
Derecelendirme
Projeler
32
9%
Arabuluculuk
0
Süresi dolmuş
0
Serbest
3
Derecelendirme
Projeler
240
73%
Arabuluculuk
7
100%
/
0%
Süresi dolmuş
1
0%
Serbest
4
Derecelendirme
Projeler
314
24%
Arabuluculuk
23
35%
/
13%
Süresi dolmuş
24
8%
Serbest
Yayınlandı: 3 kod
5
Derecelendirme
Projeler
134
43%
Arabuluculuk
0
Süresi dolmuş
3
2%
Çalışıyor
6
Derecelendirme
Projeler
178
39%
Arabuluculuk
4
25%
/
50%
Süresi dolmuş
14
8%
Serbest
7
Derecelendirme
Projeler
3
0%
Arabuluculuk
8
13%
/
88%
Süresi dolmuş
1
33%
Serbest
8
Derecelendirme
Projeler
6
33%
Arabuluculuk
6
0%
/
67%
Süresi dolmuş
1
17%
Çalışıyor
Proje bilgisi
Bütçe
40+ USD
Son teslim tarihi
to 1 gün