Spécifications
//@version=5
strategy("Operator Psychology Trading Strategy with Heikin-Ashi (Auto Risk-Reward)", overlay=true, pyramiding=2, default_qty_type=strategy.fixed, default_qty_value=1)
// Check for the 3-minute timeframe
if (not (timeframe.isintraday and timeframe.period == "3"))
runtime.error("This strategy can only be run on the 3-minute timeframe.")
// Parameters for ATR, Stop-Loss, Risk Percentage, and Sideways Market Threshold
atrLength = input.int(3, title="ATR Length") // ATR length set to 3
riskMultiplier = input.float(3, title="Risk Multiplier for Stop-Loss") // Updated Risk Multiplier to 3
capitalRiskPercent = input.float(2, title="Capital Risk Percentage per Trade", minval=0.1, maxval=100) // Capital Risk set to 2%
sidewaysThreshold = input.float(1.6, title="Sideways ATR Threshold", minval=0.1) // Updated Sideways ATR Threshold to 1.6
// Moving Average for Trend Detection
maLength = input.int(6, title="Moving Average Length") // Updated Moving Average length to 6
ma = ta.sma(close, maLength)
// Heikin-Ashi Candle Calculation
haClose = (open + high + low + close) / 4
var haOpen = (open + close) / 2
haOpen := na(haOpen[1]) ? (open + close) / 2 : (haOpen[1] + haClose[1]) / 2
haHigh = math.max(high, math.max(haOpen, haClose))
haLow = math.min(low, math.min(haOpen, haClose))
// Calculate ATR based on Heikin-Ashi candles
atrValue = ta.atr(atrLength)
// Define the previous and current Heikin-Ashi candle values
prevHaClose = haClose[1]
prevHaHigh = haHigh[1]
prevHaLow = haLow[1]
prevHaOpen = haOpen[1]
currHaClose = haClose
currHaHigh = haHigh
currHaLow = haLow
currHaOpen = haOpen
// Calculate buy and sell volumes using Heikin-Ashi candles
prevBuyVolume = prevHaClose > prevHaOpen ? volume : 0
currBuyVolume = currHaClose > currHaOpen ? volume : 0
prevSellVolume = prevHaClose < prevHaOpen ? volume : 0
currSellVolume = currHaClose < currHaOpen ? volume : 0
// Sideways Market Condition: Check if ATR is below threshold (low volatility)
sidewaysMarket = atrValue < sidewaysThreshold
// Define Buy Signal conditions based on operator psychology using Heikin-Ashi candles and trend confirmation
buyCondition1 = currHaClose > prevHaHigh // Heikin-Ashi close breaks previous Heikin-Ashi high
buyCondition2 = currBuyVolume > prevBuyVolume // Current buying volume exceeds previous
buyCondition3 = prevHaClose < currHaOpen // Previous Heikin-Ashi candle closes lower than current open
buyCondition4 = haClose > ma // Close price is above moving average (trend confirmation)
buySignal = buyCondition1 and buyCondition2 and buyCondition3 and buyCondition4 and not sidewaysMarket // Avoid sideways zones
// Define Sell Signal conditions based on operator psychology using Heikin-Ashi candles and trend confirmation
sellCondition1 = currHaClose < prevHaLow // Heikin-Ashi close breaks previous Heikin-Ashi low
sellCondition2 = currSellVolume > prevSellVolume // Current selling volume exceeds previous
sellCondition3 = prevHaClose > currHaOpen // Previous Heikin-Ashi candle closes higher than current open
sellCondition4 = haClose < ma // Close price is below moving average (trend confirmation)
sellSignal = sellCondition1 and sellCondition2 and sellCondition3 and sellCondition4 and not sidewaysMarket // Avoid sideways zones
// Calculate Stop-Loss and Target Levels for Long and Short Positions
longStopLoss = currHaClose - (atrValue * riskMultiplier) // Stop-loss for long position
shortStopLoss = currHaClose + (atrValue * riskMultiplier) // Stop-loss for short position
// **Auto Risk-Reward Ratio**: The Reward (Target) is dynamically calculated based on the risk
rewardRatio = input.float(6, title="Default Risk-Reward Ratio") // Updated Risk-Reward Ratio to 6
longTarget = currHaClose + (currHaClose - longStopLoss) * rewardRatio // Target for long position
shortTarget = currHaClose - (shortStopLoss - currHaClose) * rewardRatio // Target for short position
// Calculate position size based on capital risk and set to auto trade 0.01 lot for XAUUSD
capital = strategy.equity
riskPerTrade = capitalRiskPercent / 100 * capital
longPositionSize = math.max(riskPerTrade / (currHaClose - longStopLoss), 0.01) // Minimum 0.01 lot for long position
shortPositionSize = math.max(riskPerTrade / (shortStopLoss - currHaClose), 0.01) // Minimum 0.01 lot for short position
// Strategy Execution: Long Trades
if (buySignal)
strategy.entry("Long", strategy.long, qty=longPositionSize)
strategy.exit("Take Profit", "Long", limit=longTarget, stop=longStopLoss)
// Strategy Execution: Short Trades
if (sellSignal)
strategy.entry("Short", strategy.short, qty=shortPositionSize)
strategy.exit("Take Profit", "Short", limit=shortTarget, stop=shortStopLoss)
// Plot shapes for buy and sell signals
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.blue, style=shape.labelup, text="LONG")
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SHORT")
// Alert conditions for buy and sell signals
alertcondition(buySignal, title="Buy Alert", message="Buy Signal Triggered!")
alertcondition(sellSignal, title="Sell Alert", message="Sell Signal Triggered!")
// Plot the Heikin-Ashi Close price for reference
plot(haClose, color=color.gray, linewidth=1, title="Heikin-Ashi Close")
// Plot moving average for trend reference
plot(ma, color=color.orange, linewidth=1, title="Moving Average (Trend Filter)")
Répondu
1
Évaluation
Projets
178
39%
Arbitrage
4
25%
/
50%
En retard
14
8%
Gratuit
2
Évaluation
Projets
35
23%
Arbitrage
4
0%
/
50%
En retard
2
6%
Travail
3
Évaluation
Projets
5
0%
Arbitrage
5
0%
/
40%
En retard
0
Gratuit
4
Évaluation
Projets
625
33%
Arbitrage
38
37%
/
50%
En retard
11
2%
Occupé
5
Évaluation
Projets
44
61%
Arbitrage
0
En retard
0
Gratuit
6
Évaluation
Projets
243
74%
Arbitrage
7
100%
/
0%
En retard
1
0%
Gratuit
Publié : 1 article
7
Évaluation
Projets
39
23%
Arbitrage
15
0%
/
87%
En retard
4
10%
Travail
8
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
9
Évaluation
Projets
89
43%
Arbitrage
4
0%
/
100%
En retard
3
3%
Travail
10
Évaluation
Projets
1447
72%
Arbitrage
119
29%
/
47%
En retard
355
25%
Travail
Publié : 3 articles
11
Évaluation
Projets
146
34%
Arbitrage
13
8%
/
62%
En retard
26
18%
Gratuit
Publié : 6 codes
Commandes similaires
The EA should be designed to react to very fast price movements on the M1 timeframe on XAUUSD. Logic overview: • When price moves up quickly, the EA should place a sell order. • The initial stop loss must be set exactly at the entry price. • A very tight trailing stop must be activated immediately. Sell trade behavior: • If price moves a few pips in favor after entry, the trade should close with a small profit via
Hello there Hpe you are doing good I am in search of a pine script expert developer who can build strategy in apudFlow in pinescript. Kinldy bid on this project if you can do this
Attach up to 32 files maximum 16 Mb per upload (.zip .txt .log .mqh .ex5 .mq5 .mq4 .mqproj .ex4 .mt5 .set .tpl .cl .py .sqlite .csv .ini .ipynb .onnx .gif .png .jpg .jpeg .mp4 .webm)
Forex
30 - 200 USD
Develop an Expert Advisor trading trend reversals. Reversal signals will be generated based on Price Action patterns. Trend will be determined based on ADX, Alligator and MACD, while the indicator selection should be available in the EA's input parameters
EA Expert MTA 4
30+ USD
I have my own indicator and needs to create EA expert working smoothly with it to hit the targets as defined in indicator: Technical approach: - The EA will read the indicator signals using Copy Buffer on the selected timeframe - The EA should hit indicator variable targets factor -Auto-Entry: Instant execution when the signal appears. -Alerts: Mobile Push Notifications + Pop-up alerts. -Money Management Auto-lot
Hybrid profitable EA
40+ USD
I am in search of a profitable bot for scalping Gold. The bot should be ready as at now to trade in a live market with good consistency. It should have a low drawdown. No martingale or grid system. The developer should be able to send a demo so I can test. If you have any profitable EA, pls
Основной стандартный и единственный индикатор Параболическая SAR. Непосредственно работа робота. 1. Производится 1 сделка при начале нового тренда, тренд определяется индикатором Parabolic SAR. Пример: если точки расположены ниже цены - значит тренд восходящий, открывается покупка (по рынку), при смене тренда на снижение - точки становятся выше цены, происходит закрытие предыдущей сделки (если она была открыта), и
hello great developer I’m hiring a developer to build a local-only trade copier that sends trades from MT4 and MT5 to NinjaTrader 8 (NT8) in real-time. This copier must be reliable, fast, and fully executable without cloud dependence. I require a short test/demo period before full delivery to ensure quality and performance. here is the full project specs in the file check it please
Trade copier
100+ USD
hello great developer This is what I need: I need a local trade copier solution to transmit trades from MT4 and MT5 to NinjaTrader 8 instantly for arbitrage purposes, with ultra-low latency and no cloud services involved. Scope of work - Develop MT4/MT5 EA or script for detecting and sending trades locally. - Create NT8 NinjaScript for listening to and executing trades. - Support market orders and lot size
I need a reliable, clean-coded Expert Advisor built for both MetaTrader 4 and MetaTrader 5 platforms. Main trading behavior: The EA follows buy and sell arrows produced by my custom indicator. Whenever a buy arrow shows up on the chart: if a sell position is currently open → close that sell immediately and enter a buy trade in its place. Whenever a sell arrow appears: if a buy position exists → close the buy and
Informations sur le projet
Budget
100 - 200 USD
Délais
de 1 à 100 jour(s)