Linear Regression MT5/MT4 EA from TradingView Indicator (Will consider higher prices)

MQL5 Experts

Specification

I have an indicator on tradingview (pine) that I would like converted into an EA on MT5. Code for the indicator:

//@version=4

study("Linear Regression Trend Channel With Pearson's R", "LRTCWPR", true, format.inherit)

period     = input(     101, "Period"       , input.integer, minval=3)

deviations = input(    2.0, "Deviation(s)" , input.float  , minval=0.1, step=0.1)

extendType = input("Right", "Extend Method", input.string , options=["Right","None"])=="Right" ? extend.right : extend.none

periodMinusOne = period-1

Ex = 0.0, Ey = 0.0, Ex2 = 0.0,Ey2 =0.0, Exy = 0.0, for i=0 to periodMinusOne

    closeI = nz(close[i]), Ex := Ex + i, Ey := Ey + closeI, Ex2 := Ex2 + (i * i),Ey2 := Ey2 + (closeI * closeI), Exy := Exy + (closeI * i)

ExT2 = pow(Ex,2.0) //Sum of X THEN Squared

EyT2 = pow(Ey,2.0) //Sym of Y THEN Squared

PearsonsR = round(-1000000*(Exy - ((Ex*Ey)/period))/(sqrt(Ex2-(ExT2/period))*sqrt(Ey2-(EyT2/period))))/10000

ExEx = Ex * Ex, slope = Ex2==ExEx ? 0.0 : (period * Exy - Ex * Ey) / (period * Ex2 - ExEx)

linearRegression = (Ey - slope * Ex) / period

intercept = linearRegression + bar_index * slope

deviation = 0.0, for i=0 to periodMinusOne

    deviation := deviation + pow(nz(close[i]) - (intercept - slope * (bar_index[i])), 2.0)

deviation := deviations * sqrt(deviation / periodMinusOne)

startingPointY = linearRegression + slope * periodMinusOne

var label pearsonsRLabel = na

label.delete(pearsonsRLabel[1])

pearsonsRLabel := label.new(bar_index[50],sma(close,100)-deviation,text=tostring(PearsonsR), color=color.black,style=label.style_labelup,textcolor=color.white,size=size.large)

var line upperChannelLine = na  , var line medianChannelLine = na  , var line lowerChannelLine = na

line.delete(upperChannelLine[1]), line.delete(medianChannelLine[1]), line.delete(lowerChannelLine[1])

upperChannelLine  := line.new(bar_index - period + 1, startingPointY + deviation, bar_index, linearRegression + deviation, xloc.bar_index, extendType, color.new(#FF0000, 0), line.style_solid , 2)

medianChannelLine := line.new(bar_index - period + 1, startingPointY            , bar_index, linearRegression            , xloc.bar_index, extendType, color.new(#4CAF50, 0), line.style_solid , 2)

lowerChannelLine  := line.new(bar_index - period + 1, startingPointY - deviation, bar_index, linearRegression - deviation, xloc.bar_index, extendType, color.new(#2196F3, 0), line.style_solid , 2)

Responded

1
Developer 1
Rating
(647)
Projects
1295
67%
Arbitration
84
26% / 49%
Overdue
338
26%
Free
Similar orders
Hi, I would like to have some functionality of an existing trade manager amended, and some new functionality added in order to suit my needs. The existing trade manager is free, so there are no licensing issues to worry about. However, I only have the .ex4 file, so you would need to decompile it first. I have attached the file here for you to see. This original manager was written for the exact strategy I trade by
Hello, I'm looking for someone to build an EA that will copy trades from MT4 & 5 over to DX trade and Match Trader. If you already have one built even better, I'll buy it. Talk soon
Preciso de um replicador de ordens do mt5 para o profit. Não é necessário muita coisa no EA,preciso de: selecionar quantidade de contratos , copiar entradas e saídas, take e stop loss
Please see indicator to base the Expert on attached. Entry: 1. Enter a market buy order if the next candle breaks above the trigger candle 2. Enter a market sell order if the next candle breaks below trigger candle Only one entry for each trigger candle (i.e. if a buy is triggered, do not enter sell / if sell is triggered, do not enter buy) 3. Stop loss is the lowest price (for buys) or highest price (for sells) of
THE GOAL OF THIS PROJECT IS TO DEVELOP AN EXPERT ADVISOR THAT OPERATES AUTOMATICALLY DURING MARKET OPENING SESSIONS,FOCUS EN FOREX ,CRYPTOCURRENCIES ,STOCKS, AND GOLD. BELOW ARE THE SPECIFIC REQUIREMENTS the EA should be able to analyze the 20 period and 200 period moving averages as part of its entry and exit estategy implementation of an order blockis required to allow the EA to open and close positions efficiently
EA for MT4 SUMMARY: The robot uses a Moving Average (MA) with 6 Levels (3 Levels above the MA and 3 Levels below the MA). It does not use other indicators. The robot will make transactions only when the price reaches these Levels, under certain conditions. No trades are made when the price reaches the MA. MA period and distance for Levels are adjustable! It is a semi-adjustable robot with many variables, which will
Liquidity sweep reversal EA based on Williams fractal with risk & trade management parameters build in should include following section in EA: entry parameters risk management trade management all based on given instructions
News Trading EA 30+ USD
News Trading Strategy Requirements General Overview The news trading strategy is designed to capitalize on price volatility that typically occurs around significant news events. The EA places pending buy and sell orders at a certain distance from the current price a specified amount of time before a news event is scheduled to occur. The EA also includes risk management features such as stop loss, take profit
I am looking for simple automated trade for NT8 . I want to place an Oco order at the open 9:30 Buy above the previous bar high and sell below the previous bar close. I want to set my own target and stop. Just this one trade
High I’m looking for someone to create a simple EA for MT4 that trades in 2 timeframes the 5 min and the 15 min chart with the trend and enters on pin bars with some conditions that I will specify if the job is taken but nothing complicated. Timeframe 5 min Chart and 15min chart simultaneously It looks to enter on the 5 min or in the 15 min chart it does not look for higher timeframe, they are the same condition for

Project information

Budget
50+ USD
For the developer
45 USD
Deadline
to 5 day(s)