|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Guys - MrPip was kind enough to show us a nice procedure to only trade during certain periods. I have modified it a bit to allow any time period to cross over midnight. In the old version if you had a trading time of say 1700 - 800 it would just mess up. A strategy I'm using needs the flexibility for every time period to check to see if it overlaps midnight and calculates the proper trading time.
If anyone wants to use this you just need to stick this in global are before the init and start procedures. Someone may tell me thats bad coding but my EA is functioning perfect now. Plus I can pick three separate trading windows (like 1500 - 2000, 2300 - 400, 600 - 900, or whatever you want. The value CheckTradingTimes needs to be included in your buy/sell process or whatever check you will be using. So you need to remember when CheckTradingTimes is TRUE it really means DO NOT TRADE - Bad Time. Enjoy and please test if you get a chance. Minnelli Forex Signal Providers - Journal PHP Code:
|
|
|||
|
How To Make Time Setting Function For EA?
hello, i am newbie in forex
Can someone tell me can we put time setting code for ea? if i can put it, how to code it? For example, i am using stoch ea when ranging time or non active trading time and easy to get 10pips daily but by doing manually. Yes, i am using this ea for my testing:-http://www.forex-tsd.com/expert-advisors-metatrader-4/440-stoch-hellkas-ea.html Let say, from 11pm to 3am, i need time setting for ea so that i am not manually make trading and sitting on the my pc 24hours for that time, i just set time on my ea and let the ea running itself and not make trading before and after the time that i have set on ea. When i open my pc and trading platform on 11pm, i just run my ea and put the time setting from that time and until certain time and i can left my pc still open and ea running with this time setting to auto trade for me. Im using the stoch ea for my study for MQL but i need some support because I'm not a programmer and have background in IT. Thanks for any help!!! |
|
|||
|
For example:
Timefilters. For any kinds of timefilter, in the beginning of the code type the following: Code:
extern bool UseHourTrade = True; extern int FromHourTrade = 8; extern int ToHourTrade = 17; 1. Timefilter with comments. After this code Code:
int start()
{
Code:
if (UseHourTrade){
if((Hour()>=FromHourTrade)&&(Hour()<=ToHourTrade))
Comment("Trading Hours");
else
{
Comment("Non-trading Hours");
return(0);
}
}
|
|
|||
|
No-trade period rectangle
I'm trying to display a rectangle that identifies no-trade times (e.g. just before & after major news) that goes the height of the chart. Does someone have some code that they could share with me to do that?
Thanks, Mark. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best Trading Times | 67-17454 | General Discussion | 17 | 11-23-2006 07:58 PM |
| Trading times - forward & backward tests compared | phazei | Metatrader 4 | 1 | 08-03-2006 01:41 PM |
| Trading Times | dennisros | General Discussion | 3 | 02-13-2006 11:42 AM |
| Trade Times | caldolegare | General Discussion | 7 | 11-15-2005 01:07 PM |