Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
Beno,
You could use code similar to above post for not trading. Just check if current day is the number of days later for closing from the open day. The code could be modified to use hours or minutes as well.
Another way would be to calculate the time to close the trade as exit_time when the trade is open. Then to exit just check the exit_time in your check exit code.
You would need to use the proper formula to add the correct value to the open time to obtain the close time. This would use the number of minutes per bar * the number of bars later to close added to the OrderOpenTime().
Hope this helps.
Robert
Quote:
Originally Posted by Beno
Gidday
I am looking for some help I can't seem to work out how to exit a position in a certian number of bars/days. eg I go long on monday and the system exits on the close 5 bars/days later.
//+------------------------------------------------------------------+
//| Check for open order conditions |
//+------------------------------------------------------------------+
void CheckForSignals() {
The above function gives the second count down for bars in the current chart. So if placed on a 5 min chart, it will show second count down for each 5 min bar.
Q: How do I get seconds count down for a 15 minute bar (ie 3x 5 min bars), when I am in a 5 min chart, so a count down of 15 minutes from 6.00 to 6.15. then 6.15 to 6.30, while I am in a 5 min chart ???
What is the string name of this indi that I should use for an iCustom part of an EA
I have tried
MT4-LevelStop-Reverse-vBO-4
MT4-LevelStop-Reverse-
MT4-LevelStop-Reverse
vBO-4
vB0.4
vtsbh2483-
MT4-LevelStop-Reverse-" + INDICATOR_VERSION + "(
So I have no idea what to do next.
or do I need to put in the ATRMode,Manual Mode etc String Names
Try the first on your list with a number zero 0 instead of a letter O for vB0-4.
Robert
Quote:
Originally Posted by Beno
What is the string name of this indi that I should use for an iCustom part of an EA
I have tried
MT4-LevelStop-Reverse-vBO-4
MT4-LevelStop-Reverse-
MT4-LevelStop-Reverse
vBO-4
vB0.4
vtsbh2483-
MT4-LevelStop-Reverse-" + INDICATOR_VERSION + "(
So I have no idea what to do next.
or do I need to put in the ATRMode,Manual Mode etc String Names