Convert indicator to classes and signal for use with MQL5 wizard

MQL5 Indicadores

Tarea técnica

I've created my own indicator of horizontal stop loss and take profit lines. I use it with a hedging strategy on three periods of EURJPY, though the indicator should work with any combination of symbols. I call the lines risk and reward lines (RR Lines) in the code. The indicator is working well, though the code could likely be refracted and reduced/simplified. I'm trying to convert it into classes for use with the MQL5 wizard so I can make an EA that uses the RR Lines. I'd like help with three things:

  1. My programming skills are at the hobby level. Look over my indicators to make sure I'm doing it right. There may be errors or you may know of easy ways to make it better, more reliable and standard.
  2. Implement indicator using classes so it functions the same but with more organization and clarity, and so it can be used with the MQL5 Wizard. For example defining a CLine object with lineValue, lineType, lineColor, lineStyle, and then CRRLines with CLine risk1, reward1, reward2, reward3, centerLine, symbol, period, atr, atr period, other inputs, or whatever. I don't know how to implement this part very well.
  3. I will also need the signal code. I use the lines to generate a sell signal like this: for a long position, if the bid price crosses the risk (bottom) line, close the position. If the bid price crosses above the reward1 line and then falls back below it, close the position and take the profit. Same for reward2. If the bid price crosses the reward3 line, the whole indicator shifts up and we start over from the center line. For a short position, if the ask price crosses the risk (top) line, close the position. If the ask prices crosses below the reward1 line and then crosses back above it, close the position...and just the opposite of long position for the rest but using the ask price.
Any questions please ask. I hope the indicator is easy to understand. It just makes five lines and calculates some values to print on the screen like pip value, recommended lot size based on percent risked across three charts, current and target risk, etc. If you see any better ways to implement the indicator, please go ahead. I will pay more if it requires more time.

Kindly,

Keegan

Note: CRRLines - calculates the lines based on symbol and period. I don't add it to any charts. RRLines combines the lines from three different periods for comparison of risk and to recommend lot size. I add this one to the main window of each chart.

Archivos adjuntos:

MQ5
CRRLines.mq5
12.1 Kb
MQ5
RRLines.mq5
30.0 Kb

Han respondido

1
Desarrollador 1
Evaluación
(59)
Proyectos
182
55%
Arbitraje
31
45% / 16%
Caducado
103
57%
Libre
2
Desarrollador 2
Evaluación
Proyectos
2
0%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
Hello, Need to convert Tradingview Indicator to MQL4 indicator. or if you have this one converted already, let me buy a copy please. If we're good, then will definitely buy it and ask to convert into EA on new order. Supertrend by KivancOzbilgic
Fix bug or modify an existing Trading view indicator to display correct. The indicator is working but not displaying/plotting all the information i want. So i want it adjusted to plot all the info
Here's a brief requirement you can use: **Description:** I am seeking an experienced MQL5 developer to create a (EA). The EA should include features for placing pending orders (Buy Stop and Sell Stop) based on market spread, managing trades effectively at the opening of new candlesticks, and implementing take profit and stop loss strategies. Additionally, I would like the option to adjust parameters based on market
I have an EA which i need to do below modifications. Variable Inputs to be added Order Type : Market , Pending Trade Type : Buy, Sell , Buy & Sell Pending Pips Step : ( Pips Value can be negative or positive to decide on what type of Pending Order ) // If trade type Buy is selected Close Type : Close All ( Bulk Close Option in MT5 ) , Close Individually Close Option : %of Equity , %of Balance , Amount $ , %of No
Add multiplier to grid recovery system. For example: Grid Trade 2-3 Spacing; 1.0 Multiplier Grid Trade 4-6 Spacing; 2.0 Multiplier Grid Trade 7+ Spacing; 1.6 Multiplier Need quick turn around. Need it done ASAP
Objects reader PIN 70 - 100 USD
Hi I have an indicator that create objects in the chart and using those following some rules the new indicator will create external global variables with value = 0 ( NONE ), = 1 ( BUY ) or = 2 ( SELL ). The global variable will use PIN external integer number . PINS are by now global variables (GV) whose name indicates the pair name and the PIN belonging and their value indicates it direction/action. PINS GV names
I want an indicator and its source code that returns the value of: - two moving averages in different selectable timeframes, with method Exponential and price calculation price_open; - Opening, closing, maximum and minimum of the candle in different timeframes And that returns the values ​​regardless in a chart of one minute. The input parameters: * select timeframe media1 = {1,2,3,4,5,...} * select timeframe media2
Hello, I want offline Renko chart based on pips and time. Trading View Renko chart is a perfect example of what I require, it prints renko bricks at close of time frame chosen which is more cleaner. The Trading View Renko chart wait until end of desired timeframe candle to close before final renko bricks are drawn. Best is to look at Trading View renko charts to see exactly how this works. I currently have an
A simple candle pattern indicator is required that makes a sound alert and draws an arrow when two consecutive bars have the same high or the same low. If two highs, the second bar is a down close and the bar immediately preceding the two highs is a lower high. Vis versa for 2 lows. The second bar is an up close and the bar immediately preceding the two lows is a higher low. Please see attached images for
Looking for someone to implent the following grid strategy into my existing EA: Overview : I need a skilled developer to implement a grid recovery strategy into my existing Expert Advisor (EA) for MetaTrader 4 (MT4). The strategy involves adding grid trades based on price movement and adjusting lot sizes according to specific rules. It also includes closing trades at breakeven points and full position closure when a

Información sobre el proyecto

Presupuesto
75 - 125 USD
Para el ejecutor
67.5 - 112.5 USD
Plazo límite de ejecución
de 5 a 7 día(s)