Good afternoon, I couldn't find InpStartHour in the code, I wanted to see how your EA working time filter is organized. There is only the definition of an external parameter with this name.
Could you please tell me how to properly organize the working time of the Expert Advisor, i.e. hours in which he can trade and hours - in which he can not.
Thanks in advance.
Good afternoon, I couldn't find InpStartHour,*** in the code.
I did. Three times.
I did. Three times.
Yes, thanks, I found it too. It turns out that if you open the code from the article with the "view" button, in a text editor, and select the word of interest by double-clicking, then controlF - for some reason the word is selected with extra spaces and thus not searched.
Later, having discovered such peculiarity I found everything. Thank you very much, this is a very compact and convenient piece of code. Now I just need to figure out what changes I need to make so that I can set hours with minutes in the parameters. At the moment I can only set integers.
Here is the piece of code I was interested in:
bool Timecontrol() { if(!InpTimecontrol) return(true); MqlDateTime STimeCurrent; TimeToStruct(TimeCurrent(),STimeCurrent); if(((STimeCurrent.hour>=0 && STimeCurrent.hour<=InpEndHour-1) || (STimeCurrent.hour>=InpStartHour && STimeCurrent.hour<=23)) && InpStartHour>InpEndHour) { return(true); } if((STimeCurrent.hour>=InpStartHour && STimeCurrent.hour<=InpEndHour-1) && InpStartHour<InpEndHour) { return(true); } //--- return(false); }
If you add the following options in the code, it would give the user more options to manage the overall trade results;
1. Ability to choose Buy Only or Sell Only trades
3. Ability for the EA to make only one trade per signal based on set target profit
If you add the following options in the code, it would give the user more options to manage the overall trade results;
1. Ability to choose Buy Only or Sell Only trades
3. Ability for the EA to make only one trade per signal based on set target profit
Can you please share the MT5 download link for the PipMaker v1 EA!?
I shall be very grateful. Thank you
I am trading synthetic indices which are not affected by trading time, so that's why the options to buy only and sell only would help me become more profitable with the FlatTrend EA by ensuring the EA trades trades say only 1 candle per signal and only trade again when another signal has appeared. Or best to combine it with an oscillator to limit the trades only when the two signals align for a Buy or Sell.
Yes, an oscillator (eg RSI) can be applied. Need to check this option ...
I am trading synthetic indices which are not affected by trading time, so that's why the options to buy only and sell only would help me become more profitable with the FlatTrend EA by ensuring the EA trades trades say only 1 candle per signal and only trade again when another signal has appeared. Or best to combine it with an oscillator to limit the trades only when the two signals align for a Buy or Sell.
Preliminary version 2.XXXX (no oscillator yet). I look forward to your feedback ...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Flat Trend EA:
EA based on FlatTrend indicator. You can also include working time.
Author: Vladimir Karputov