You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello.
Is it possible to write a signal for an EA (based on "head and shoulders" pattern) in MQL4?
On the screenshot :
- wave (straight red line with dots) = line connecting max and min between intersections of 2 averages ma1 and ma2. (crossover in normalized pips)
The pattern is marked with a solid red line.
- ma3 = older timeframe average
- all ma = simple, close, period and timeframe are set
- AO is custom for 5 digits ( I use it only for visual calculation of waves). If applied to signal writing, the number of digits should be normalised.
- to use slippage and magic
- for buy, enter from the max 1st wave + filter in the normalized points + at the Ask price
filter = this is the offset in normalized pips from the max/min of the 1st wave , set by the user
- for sell the signal is mirrored
entry from Min of the 1st wave + filter in normalized points + by Bid price
- I ask for the source code, since I'm trying to learn the MQL4 language myself.
- there are 3 more versions of this signal to open a deal in the archive.
If you have a good strategy and are willing to share it, I can write an EA. I invite you to discuss it either publicly or in private messages.
Hello.
Is it possible to write a signal for an EA (based on "head and shoulders" pattern) in MQL4?
On the screenshot :
- wave (straight red line with dots) = line connecting max and min between intersections of 2 averages ma1 and ma2. (crossover in normalized pips)
The pattern is marked with a solid red line.
- ma3 = older timeframe average
- all ma = simple, close, period and timeframe are set
- AO is custom for 5 digits ( I use it only for visual calculation of waves). If applied to signal writing, the number of digits should be normalised.
- to use slippage and magic
- for buy, enter from the max 1st wave + filter in the normalized points + at the Ask price
filter = this is the offset in normalized pips from the max/min of the 1st wave , set by the user
- for sell the signal is mirrored
entry from Min of the 1st wave + filter in normalized pips + at Bid price
- I ask for the source code, since I'm trying to learn the MQL4 language myself.
- There are 3 more versions of this signal to open a deal in the archive.
I will not promise anything about the indicator... I will not promise anything about the indicator. Maybe someday, when there are no interesting strategies, I will be able to use indicators...
I have a strategy and would like to make an EA based on it to test its work in automatic mode.I need an EA for MetaTrader 4.Trade with pending stop orders on one currency pair, with a signal to enter based on the Fractals indicator. Closing of positions - by TP. All positions are accompanied by adjustable trailing stop. Lot is calculated as a percentage of the balance. If to be more specific, I put the idea to the public view, anyway this strategy is suitable only for some currency pairs. Description in the attached text file.
I can't promise anything about the indicator... The topic of EAs hasn't dried up yet... Maybe someday, when there are no interesting strategies, I will be able to work with some indicators...
I do not need an indicator. The Expert Advisor I need is based on "head and shoulders" pattern and its modifications (signals for opening and closing trades). It is the only reversal pattern on forex, the other reversals are for other markets. If these signals cannot be programmed, then there is no point in talking about an Expert Advisor.
I didn't read it carefully... it's possible in principle... but the question is how accurate it would be... we'd have to average the candles with lines... the idea is that we need 4 lines to describe a pattern... problem 1 is how to determine how deep into the story to look... preferably the software should be able to determine... problem 2: let's say we have a broken line, we need to determine its parameters when a signal appears...
Problem 3: in theory we have 4 segments, of different lengths, and due to corners of these lines, the top may shift to the side against us...
This all can be solved, but each of the points adds error. I would do it, but for lack of free time at the moment, I would put it off for an indefinite period ... when I'm more free and if it is still relevant, I will do it ... but when will it be, I don't know ...
Hi all! I have faced a problem with all trend-following EAs - a flat, which literally kills all previously gained profits. I have set myself the goal of creating something universal to keep losing trades to a minimum.
Need a programmer to create a piece of code that can be put into any trend EA.
The essence of the idea is the following.
1) Upon receipt of a given signal, we open aSell position (1 lot). A grid of pending orders is set higher than the open order at a given distance, for example 20 points - Buy Stop, Sell Limit - 2 lots; Buy Stop, Sell Limit - 4 lots; Buy Stop, Sell Limit - 8 lots. These orders are locked.
2) When Take Profit or Breakeven level is reached, the pending orders are deleted.
2) When a Buy Stop and Sell Limit reaches 2 lots, we wait where the price will go next. If the price reaches Take Profit or Breakeven level, we close all open pending orders using theCloseBy function and delete the remaining pending orders. If the price gets a Buy Stop and Sell Limit (4 lots) then we simultaneously close a Sell order (1 lot) and a Buy order (2 lots), getting a 20 pips profit. Then if the price reaches an open Sell order (2 lots) we close that order to zero and close all open pending orders (4 lots) using Slosewy function and delete the remaining pending orders.
3) If price went higher and caught a buy stop and sell limit (8 lots), then we close a sell order 2 lots and a buy order 4 lots. If the price comes back to the sell order (4 lots) then we close this order at zero and open pending orders (8 lots) by SloSeBy. If the price goes higher by another 20 pips, we close all the orders.
Example sell trade with a grid of orders.
_______________________________________________________________tb3(8 lots)
_______________________________________________________________ts3(8 lots)
_______________________________________________________________tb2(4 lots)
_______________________________________________________________ts2(4 lots)
_______________________________________________________________tb1(2 lots)
_______________________________________________________________ts1(2 lots)
_______________________________________________________________ sell
There is an EA (attached).
The first order opens on a signal of two MA crossing. Then the price goes either to TP, or collects a specified number of limits and then fixes the deal at a total profit. The programmer I was working with has disappeared, so some ideas have not been implemented. On the whole, the Expert Advisor shows quite good results in such a form, but in the end it will most probably fail. I would like to make the following improvements in order for it to work more correctly:
1. the first order should be opened not at the moment of crossing, but at the OPEN of the next candle (if the crossing still exists) in order to avoid false crossovers as much as possible. At present, the Expert Advisor quite often catches such false signals and therefore loses a lot of money due to the absence of the signal on SL (see the next point).
2. SL. The closing of all open orders is forced at the moment of an opposite MA crossing. At this point, the EA does not always close losing positions. And I think the problem with the first point is not always its fault. I do not always close positions at the next MA crossing but I fail to understand why. The Expert Advisor continues to set limits which often results in even larger drawdowns.
Anyway, let's work on it collectively. I have more ideas to reduce risks but I should run the described variant first.
There is an EA (attached).
The first order opens on a signal of two MA crossing. Then the price goes either to TP, or collects a specified number of limits and then fixes the deal at a total profit. The programmer I was working with has disappeared, so some ideas have not been implemented. On the whole, the Expert Advisor shows good results in such a form, but in the end it will most probably fail. I would like to make the following improvements in order for it to work more correctly:
1. the first order should be opened not at the moment of crossing, but at the OPEN of the next candle (if the crossing still exists) in order to avoid false crossovers as much as possible. At present, the Expert Advisor quite often catches such false signals and therefore loses a lot of money due to the absence of the signal on SL (see the next point).
2. SL. The closing of all open orders is forced at the moment of an opposite MA crossing. At this point, the EA does not always close losing positions. And I think the problem with the first point is not always its fault. I do not always close positions at the next MA crossing but I fail to understand why. The Expert Advisor continues to set limits which often results in even larger drawdowns.
Anyway, let's work on it collectively. I have more ideas to reduce risks but I should run the described variant first.
When compiling, it gives a whole bunch of non-critical errors. But that's not the main thing. The main thing is that the orders don't open at all. We need to see how it opens orders and closes them. Maybe you have not successfully trimmed it when attaching the file. If you have one, send me the set file.