Bassam Salman:
Hi
how can I add a filter to my Hedge expert
Time filter start form 04:00 to 16:00 if there order found after time ended the expert still work and take orders as hedging until to take profit
Regards
Bassam
You can create a function and check this in OnTick().
Example of such a function:
bool isAllowTrading(){ //Result is true between 04:00:00 ~ 16:00:00 GMT, otherwise false bool result = false; MqlDateTime DtStruct; bool success = TimeToStruct(TimeCurrent(),DtStruct); if((DtStruct.hour > 3) && (DtStruct.hour < 17)) result = true; return result; }

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
Hi
how can I add a filter to my Hedge expert
Time filter start form 04:00 to 16:00 if there order found after time ended the expert still work and take orders as hedging until to take profit
Regards
Bassam