Hi,
I'm using the following code as a time filter. It works well in my EA but not in the Strategy Tester. I know this has been covered elsewhere in the forum but I'm still at a loss. Any assistance would be appreciated. Thx Neil
<CODE REMOVED>
Please read some other posts before posting . . .
Please edit your post or have your thread removed . . . please use the SRC button to post code: How to use the SRC button.
Hi,
I'm using the following code as a time filter. It works well in my EA but not in the Strategy Tester. I know this has been covered elsewhere in the forum but I'm still at a loss. Any assistance would be appreciated. Thx Neil
Your posted code is incomplete . . .
time_now = TimeCurrent(); MarketInfo(
. . . do you think MarketInfo() will work in the Strategy Tester ?
Your posted code is incomplete . . .
. . . do you think MarketInfo() will work in the Strategy Tester ?
// Trade Time 2 Filter extern bool Trade2TimeFilter = false; // Whether to use trade time filter extern string Trade2Begin = "13:00"; // Don't trade before this time - GMT extern string Trade2End = "16:00"; // Don't trade after this time - GMT extern bool EndInTomorrow2 = false; // Whether TradeEnd is the next day, like you want to trade the period: 18:00~06:00, the 06:00 is the next am //+------------------------------------------------------------------+ // // tradeTime2. // // Trade Time Filter @http://kolier.li // @see http://kolier.li/example/script-function-trade-time-filter //+------------------------------------------------------------------+ bool tradeTime2() { if(Trade2TimeFilter) { datetime time_now, time_begin, time_end, time_end_today; time_now = TimeCurrent(); time_begin = StrToTime(Trade2Begin); if(!EndInTomorrow2) { time_end = StrToTime(Trade2End); } else if(EndInTomorrow2) { time_end = StrToTime(Trade2End) + 86400; time_end_today = StrToTime(Trade2End); } if ( !EndInTomorrow2 && (time_now<time_begin || time_now>time_end) ) { return(false); } else if(EndInTomorrow2 && time_now>time_end_today && time_now<time_begin) { return(false); } } return(true); }
Please edit your post or have your thread removed . . . please use the SRC button to post code: How to use the SRC button.
RaptorUK - you have been very helpful to me and others on this forum. The comment below is not meant to be rude/disrespectful but I don't understand what you are asking for ...
I have edited my post multiple times trying to be more clear. I obviously do not understand what you are asking for so threatening to remove my post [I'll ask you once more to edit your post . . . is it too much to ask ?] will not help me understand exactly what it is that you are looking nor what it is that I have done wrong.
Play video | Please edit your post. For large amounts of code, attach it. |
If you can't be bothered to answer our questions and edit your posts as requested, I can't be bothered to look at your code and try to help you.
If you can't be bothered to click on the links that show you exactly how, then I assume asking you for any additional information and/or testing will also be useless, thus there is no way to help you.
If you can't be bothered to learn since 2009 how this forum works, I'm certainly not going to waste my time with your posts.
RaptorUK - you have been very helpful to me and others on this forum. The comment below is not meant to be rude/disrespectful but I don't understand what you are asking for ...
I have edited my post multiple times trying to be more clear. I obviously do not understand what you are asking for so threatening to remove my post [I'll ask you once more to edit your post . . . is it too much to ask ?] will not help me understand exactly what it is that you are looking nor what it is that I have done wrong.
snafu4,
I think that they are referring to your first post.
Thanks GumRai. It would appear. I've given up.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I'm using the following code as a time filter. It works well in my EA but not in the Strategy Tester. I know this has been covered elsewhere in the forum but I'm still at a loss. Any assistance would be appreciated. Thx Neil