Dear Vladimir, can you help me to make an EA with only fractal indicator signals. and wear SL and TP and trailing. for scalping trading. hopefully it can provide better colors in the mql5 world. You are a very good programmer.
10:21
Dear Vladimir, you can help me to make an Expert Advisor based on signals from fractal indicators only. and use SL, TP and trailing. for scalping. Hopefully it will increase the color in the MQL5 world. You are a very good programmer.
10:22
hope you can help me just to share. with fractal indicator codebase only for each transaction. if there is a fractal sign will open if not advance. and placing pending orders above the fractal line from the breakout area.
10:26
In fact, every time there is a transaction, the fracture willfunction . For example the fractal above, the trade will sell dan SL and TP.
Good day.
What indicator do you want to create an Expert Advisor based on?
Keep records of open charts (more precisely, keep records of not chart numbers, but records of actions: the symbol "such and such", the timeframe "such and such" is already open.
i've been trying but i can't find out how, i'm using a multi symbol and multi timeframe expert advisor so its hard for me to check symbol and timeframe for over 100 charts, is there a easier way ?
Ahmad861 : i've been trying but i can't find out how, i'm using a multi symbol and multi timeframe expert advisor so its hard for me to check symbol and timeframe for over 100 charts, is there a easier way ?
The terminal can open a maximum of 100 charts (no more).
So, before applying the chart template, you need to bypass all charts and check: "Is the chart on the" SYMBOL "symbol and on the" TIMEFRAME "timeframe already open"?
An example of traversing all charts can be taken from here: ChartNext.
Final function:
//+------------------------------------------------------------------+//| Is Chart Open |//+------------------------------------------------------------------+bool IsChartOpen(conststring symbol, constENUM_TIMEFRAMES timeframe)
{
//--- variables for chart IDlong currChart,prevChart=ChartFirst();
int i=0,limit=100;
while(i<limit)// We have certainly not more than 100 open charts
{
currChart=ChartNext(prevChart); // Get the new chart ID by using the previous chart IDif(currChart<0)
break; // Have reached the end of the chart listif(ChartSymbol(currChart)==symbol)
if(ChartPeriod(currChart)==timeframe)
return(true);
i++;// Do not forget to increase the counter
}
//---return(false);
}
The terminal can open a maximum of 100 charts (no more).
So, before applying the chart template, you need to bypass all charts and check: "Is the chart on the" SYMBOL "symbol and on the" TIMEFRAME "timeframe already open"?
An example of traversing all charts can be taken from here: ChartNext.
Remember the rule of working with indicators in MQL5: an indicator handle is created in OnInit. In the future, the indicator handle, using CopyBuffer, is used to receive data from the indicator.
Ahmad861 : What would i get by lying ? if it doesn't work, it doesn't work, it's totally fine
Your problem is that you cannot formulate the problem. I'm not a wizard or telepathic - but I made an attempt to read your mind ( # 103 ). If you say "it doesn't work for me" - please put yourself in my place: look from the outside - you didn't say anything, but say that nothing works.
If you want help - describe your problem, show the code, tell us what exactly does not work.
Example: how to get the value of the 'iAO' indicator in an advisor
Code: iAO Get Value.mq5
When working in MQL5, remember the main rule: the indicator handle (in this example, it is the 'handle_iAO' variable) must be created ONLY ONCE and IT IS NECESSARY TO DO IN OnInit ()
The code below shows an example of how to get the indicator handle in the EA and how to access the indicator data in the EA. For example, I additionally placed an indicator on the chart so that you can visually compare the indicator readings and the data obtained in the EA.
Good day.
What indicator do you want to create an Expert Advisor based on?
Keep records of open charts (more precisely, keep records of not chart numbers, but records of actions: the symbol "such and such", the timeframe "such and such" is already open.
i've been trying but i can't find out how, i'm using a multi symbol and multi timeframe expert advisor so its hard for me to check symbol and timeframe for over 100 charts, is there a easier way ?
The terminal can open a maximum of 100 charts (no more).
So, before applying the chart template, you need to bypass all charts and check: "Is the chart on the" SYMBOL "symbol and on the" TIMEFRAME "timeframe already open"?
An example of traversing all charts can be taken from here: ChartNext.
Final function:
Call example:
The terminal can open a maximum of 100 charts (no more).
So, before applying the chart template, you need to bypass all charts and check: "Is the chart on the" SYMBOL "symbol and on the" TIMEFRAME "timeframe already open"?
An example of traversing all charts can be taken from here: ChartNext.
Final function:
Call example:
I've tried this way, still doesn't work
I don't believe anyone if there is no code and no description of actions :)
You did not show the code - you did not describe your actions - you only hear "it does not work". I do not believe you.An example of working with iCustom - we get the indicator data in the EA [data folder]\MQL5\Indicators\Examples\MACD.mq5
Code: iCustom iMACD value on chart.mq5
The custom MACD indicator is located in the folder:
Remember the rule of working with indicators in MQL5: an indicator handle is created in OnInit. In the future, the indicator handle, using CopyBuffer, is used to receive data from the indicator.
I don't believe anyone if there is no code and no description of actions :)
You did not show the code - you did not describe your actions - you only hear "it does not work". I do not believe you.What would i get by lying ? if it doesn't work, it doesn't work, it's totally fine
Your problem is that you cannot formulate the problem. I'm not a wizard or telepathic - but I made an attempt to read your mind ( # 103 ). If you say "it doesn't work for me" - please put yourself in my place: look from the outside - you didn't say anything, but say that nothing works.
If you want help - describe your problem, show the code, tell us what exactly does not work.
Remove all symbols from the Market Watch
Code: Remove all symbols.mq5
Example: how to get the value of the 'iAO' indicator in an advisor
Code: iAO Get Value.mq5
When working in MQL5, remember the main rule: the indicator handle (in this example, it is the 'handle_iAO' variable) must be created ONLY ONCE and IT IS NECESSARY TO DO IN OnInit ()
The code below shows an example of how to get the indicator handle in the EA and how to access the indicator data in the EA. For example, I additionally placed an indicator on the chart so that you can visually compare the indicator readings and the data obtained in the EA.
Code:
Result:
Pic. 1. iAO Get Value
Pic. 2. iAO Get Value