Obba EA

MQL5 Indicadores Asesores Expertos

Tarea técnica

I have this indicator that I use for my strategy and I want make it into an EA

/@version=5
indicator("Swing High/Low with Horizontal Lines", overlay=true)

// Inputs
barsback = input(2, title='Bars back to check for a swing')
futureBars = input(10, title='Number of future bars for horizontal line')
showSwings = input.string("Both", title="Show Swings", options=["Both", "Highs", "Lows"])
maxSwings = input.int(5, title="Maximum number of swings to show", minval=1)

// Function to detect swing highs and lows
swing_detection(index) =>
    swing_high = true
    swing_low = true
    for i = 1 to barsback
        if high[index - i] >= high[index] or high[index + i] > high[index]
            swing_high := false
        if low[index - i] <= low[index] or low[index + i] < low[index]
            swing_low := false
    [swing_high, swing_low]

// Detect swings for the current bar
[swing_high, swing_low] = swing_detection(barsback)

// Initialize arrays for swing lines and their end bars
var line[] swingHighLines = array.new_line()
var int[] swingHighEndBars = array.new_int()
var line[] swingLowLines = array.new_line()
var int[] swingLowEndBars = array.new_int()

// Function to draw lines
draw_line(lineArray, endBarArray, index, price, color) =>
    if array.size(lineArray) >= maxSwings
        line.delete(array.shift(lineArray))
        array.shift(endBarArray)
    newLine = line.new(x1=bar_index - index, y1=price, x2=bar_index - index + futureBars, y2=price, color=color, width=2)
    array.push(lineArray, newLine)
    array.push(endBarArray, bar_index + futureBars)

// Check if the line should be extended or stopped
update_lines(lineArray, endBarArray) =>
    for i = 0 to array.size(lineArray) - 1
        lineId = array.get(lineArray, i)
        endBar = array.get(endBarArray, i)
        price = line.get_y1(lineId)
        if bar_index <= endBar
            if high >= price and low <= price
                array.set(endBarArray, i, bar_index)
                line.set_x2(lineId, bar_index)
                line.set_extend(lineId, extend.none)

// Conditionally draw swing highs and lows based on user selection and maximum number of swings
if (showSwings == "Both" or showSwings == "Highs") and swing_high
    draw_line(swingHighLines, swingHighEndBars, barsback, high[barsback], color.red)

if (showSwings == "Both" or showSwings == "Lows") and swing_low
    draw_line(swingLowLines, swingLowEndBars, barsback, low[barsback], color.green)

// Update lines to stop extending when crossed
if showSwings == "Both" or showSwings == "Highs"
    update_lines(swingHighLines, swingHighEndBars)

if showSwings == "Both" or showSwings == "Lows"
    update_lines(swingLowLines, swingLowEndBars)


Identify swings using the above indicator way of identifying them 

Compare two charts (Allow me to choose which charts + allow me to use the time frame) (time frame should be in the same for both of them)

Mark the common swings (Common swing is a swing that has formed on both choose charts within the same candle on the selected time frame 

Once one of the common swings broken on only 1 chart and not on the other (That is called Obba) set a stop order on the pair that hasn’t broken the common swing
For example 

Pair 1 broke the common swing high but pair 2 didn’t, then Set stop order on pair 2 on the low of the last formed candle, set SL on the common swing 
Set Tp 2.5RR

If the common swing is broken before order activation then cancel the order 

If the order is not activated and new candle formed and the common swing still not broken then cancel the order and set it again on the low of the last formed candle 

When price reaches 1.5RR move stop loss to breakeven and close 0.25% of the open lot size

Only 1 trade per pair a time (you can enter for the other pair) unless the open trade is on breakeven 


Maximum loses per day ( variable) 

Maximum Tp ( variable)

Chosen Risk in percentage from the equity capital ( variable) 

Han respondido

1
Desarrollador 1
Evaluación
(2)
Proyectos
3
33%
Arbitraje
0
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(49)
Proyectos
70
16%
Arbitraje
2
50% / 0%
Caducado
7
10%
Trabaja
3
Desarrollador 3
Evaluación
(1)
Proyectos
1
0%
Arbitraje
0
Caducado
0
Trabaja
4
Desarrollador 4
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
5
Desarrollador 5
Evaluación
(90)
Proyectos
111
37%
Arbitraje
8
88% / 0%
Caducado
0
Trabaja
6
Desarrollador 6
Evaluación
(57)
Proyectos
177
71%
Arbitraje
4
100% / 0%
Caducado
1
1%
Libre
7
Desarrollador 7
Evaluación
(5)
Proyectos
6
17%
Arbitraje
2
0% / 100%
Caducado
0
Trabajando
Solicitudes similares
Hello, I am looking for a highly skilled and experienced MT5 developer to assist with modifying an existing MT5 file. I am looking for a dedicated and professional developer who can deliver high-quality results. If you have any questions or need further details about the project, feel free to reach out. Thank you for your time and consideration. I look forward to working with the right expert to bring this project to
An EA based on zigzag and some indicators ( The ea is already working i need to add this indicator to guide and control trades) Project Overview: - I am seeking a skilled freelance developer to enhance my existing Expert Advisor (EA) by creating source code that I can easily integrate. The EA currently uses Moving Averages (MA) and lines to place trades. I need to add a zigzag function with a true/false option and
This is the ea I will be looking to do 2 jobs this one then another one later. Dashboard Is 5034 Lines of code I want to remove the dashboard form the indicator and add it to the dashboard like this and add these features to it Indicator Changes I want to change the indicator The Moving Average Ribbon I want to Add a input to make it fill out or hollow like it is CURRENTLY and I want to add the buy and sell word to
I have an MT4 indicator which is a histogram indicator. However this indicator has issues. 1. It does not show in the strategy tester. 2. It has an odd behavior at the zero level. The buy and sell arrows for the zero arrow show only 3 bars after they have crossed the zero level. Even if they show they lag, by that much of candles. I need an expert to modify the indicator to ensure that its histogram bars are as
Hello my friend There is a project I will send you an indicator code for you What is required is the version of 4 copies of the indicator Edition 1 1, delete the shares and signals and only keep the red and blue lines and transfer them (the stores of the red and blue lines) from the color section to the settings section so that they appear as in the picture (4) Issue 2 2, Return to the first original index, stir
I 'm looking for a bot to take trades . I have questions 1 . What is the win rate? It could be ! 2 . Any guarantee if the bot does not take a win trade
hi this is a question regarding your telegram to metatrader copier. if i buy the premium/lifetime will it work on unlimited accounts? or will you lock in in an account
Make a 10000 plus script trading Expert advisor with detail and make it flawless with no errors no tiny mistakes and make it in mql 5 language. Make it adjustable for it to be able to trade on its own and not be disturbed and make it study the chart and be able to trade any currency pair. I have zero experience and I would just like to copy and paste the code in MetaTrader. Can you make it be compatible with both
I need a good programmer to code multiple pairs and Time Frame dashboard indicator. I don’t have the mq4 version of the indicator. When the indicator's value is Positive, it’s a DOWN trend. When the indicator's value is Negative, it’s an UP trend. In the setting : I must choose the pairs I want to check on the chart. Example : Pairs : AUDCAD, AUDJPY, AUDUSD, EURUSD, GBPNZD, GBPUSD, NAS100, US30, ……………………….. I must
Hello I need a simple heiken ashi candle indicator created . The difference I would like the I indicator to show more candles I know the heiken ashi candle open use the previous days open, close but I would like it to show more candles . So basically say if the previous candle is red the open heiken ashi should be coded using previous days open,close and low / 3. It Sound confusing but all im trying to do is get more

Información sobre el proyecto

Presupuesto
30+ USD

Cliente

(3)
Encargos realizados4
Número de arbitrajes0