I have a code in tradingview Pinescript and need it converting to mql4

MQL5 Konvertierung

Spezifikation

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")


Bewerbungen

1
Entwickler 1
Bewertung
(1)
Projekte
1
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
2
Entwickler 2
Bewertung
(14)
Projekte
23
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
3
Entwickler 3
Bewertung
(60)
Projekte
182
72%
Schlichtung
4
100% / 0%
Frist nicht eingehalten
1
1%
Frei
4
Entwickler 4
Bewertung
(157)
Projekte
268
25%
Schlichtung
13
31% / 8%
Frist nicht eingehalten
16
6%
Beschäftigt
5
Entwickler 5
Bewertung
(71)
Projekte
94
38%
Schlichtung
0
Frist nicht eingehalten
3
3%
Arbeitet
6
Entwickler 6
Bewertung
(127)
Projekte
161
35%
Schlichtung
4
25% / 50%
Frist nicht eingehalten
13
8%
Arbeitet
7
Entwickler 7
Bewertung
(2)
Projekte
2
0%
Schlichtung
2
0% / 50%
Frist nicht eingehalten
1
50%
Beschäftigt
8
Entwickler 8
Bewertung
(5)
Projekte
5
20%
Schlichtung
0
Frist nicht eingehalten
1
20%
Arbeitet
Ähnliche Aufträge
I have an Expert Advisor in ex4 and mq4 file formats that I would like to recreate with its original strategy. I believe the file have a bug or one error inside or maybe also is a Decomp file , and as a result, I am unable to understand the rules it follows to evaluate the market and open orders. I am looking for a developer who can help me reconstruct the strategy accurately. The mql4 format file would need to be
Skarito98 30 - 100 USD
Always stay winning and survive....we all want a better life now this is a chance someone can take,to change their lives for the better.No one is supposed to suffer in this world,we create and invert new things and come up with ideas to solve situations we come across especially when it comes to finance. We all need better things in life and God want good things for us
hello i need a professional to convert a fully functioning buy and sell signal strategy on tradingview to EA mt4 , the signals trigger when the bar closed match all conditions , it has a specific calculation for strength of each pair
Attached is a ThinkScript Strategy. I would like to convert it into an Expert Advisor for MQL4. Here is a link of a PineScript code for a similar indicator. This is just to give you additional info about the indicator, hence helping you to convert it from Thinkscript to MQL4
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity
Only with feedbacks 30 - 100 USD
PINESCRIPT->MQL4 i need a exactly conversion of the file attached to mql4 with source code (i need the source code), obviously as indicator for mt4 let me know your bid and timeline
C onversion from Ninjatrader to Tradingview. This includes thorough testing and debugging to guarantee that the script functions as intended on Tradingview...If you are in for this job kindly bid
I have a scource code for a think or swim indicator that I would like to have coded to pine script so that it can run in trading view. If you have experience in doing this type of work please contact me. Thank you
Hi, i have a tos script i need converted to Ninja script, but someone who knows both coding. Cant be someone who is just going to paste into chat gpt, it requires more understanding for compatibility
Hi, i have a tos script i need converted to Ninja script, but someone who knows both coding. Cant be someone who is just going to paste into chat gpt, it requires more understanding for compatibility

Projektdetails

Budget
40+ USD
Für die Entwickler
36 USD
Ausführungsfristen
bis 1 Tag(e)