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
I have made a script that changes the size of the stop loss to 200 pips, but there is an error instead of moving the stop
I have made a script that changes the size of the stop loss to 200 pips, but there is an error instead of moving the stop
Here. Simplified and added a message about what SL and TP the script is trying to do. Stops are already in prices
But nothing happens.
I think it's called "following the trend".
- Long position will be opened if close price is higher than maximal price of last 20 bars;
- close a long position if close price is below the minimum price over last 10 bars;
- close a short position if the close price is less than the minimum price over the last 20 bars; close a short position if the close price is less than the minimum price over the last 10 bars
- close a short position if the close price is above the last 10 bar; close a short position if the close price is above the last 10 bar.
Or maybe kind people can help you to write it?
Modifying stops requires you to include certain fields in the query:
This is where your stop should change after such a request.
I have a question, I have not decided to create a separate thread because of it. I hope the author will not get offended and the question will not get lost.
The question is about the Trading Signal Modules - https://www.mql5.com/ru/docs/standardlibrary/expertclasses/csignal and let's take for example the description of MACD signals"Divergence - the first analyzed oscillator trough is shallower than the previous one and the corresponding price trough is deeper than the previous one" - it is interesting to look at the code how this signal is looked for. We open SignalMACD.mqh but there are IS_PATTERN_USAGE(0) conditions instead and so on.
How can I see the code for how the divergence itself is looked for? That is, how does the comparison of one candle with another indicator on one bar look like on the other, where is this code?
Some DCs in real accounts assign all sorts of prefixes like "." or "FXF" to symbol names.
How can I use these prefixes?
I did it this way:
#define DEF_SPEC "FXF"
string SymbolsTrade[] = {"AUDCAD "DEF_SPEC ... -does not work
string SymbolsTrade[] = {"AUDCAD "+DEF_SPEC ... -it doesn't work like that either
as the result I get just FXF instead of AUDCADFXF.
Can you tell me how to do it?
I have a question. I hope the author is not offended and the question is not lost.
The question is about the Trading Signal Modules - https://www.mql5.com/ru/docs/standardlibrary/expertclasses/csignal and let's take for example the description of MACD signals"Divergence - the first analyzed oscillator trough is shallower than the previous one and the corresponding price trough is deeper than the previous one" - it is interesting to look at the code how this signal is looked for. We open SignalMACD.mqh but there are IS_PATTERN_USAGE(0) conditions instead and so on.
How can I see the code for how the divergence itself is looked for? That is, how does the comparison of one candle with another indicator on one bar look like on the other, where is this code?
You can view the code in the source code. There are two methods to search for the divergence:
1. The bool CSignalMACD::ExtState(int ind) method - it prepares data for searching;
2. The bool CSignalMACD::CompareMaps(int map,int count,bool minimax,int start) method looks for a market model with the specified parameters.
If it helps, here are comments to the methods in Russian:
For the bool CSignalMACD::ExtState(int ind) method
For the method bool CSignalMACD::CompareMaps(int map,int count,bool minimax,int start)