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.
Bar counting always occurs right to left (present to past) in MQL correct?
How do I achieve past to present bar counting?
For a simple example, how would I go about numbering each bar in a given month with 1 representing the first bar of the month and subsequent bars incrementing up?
create new objects using name and position of existing objects
One of my learning projects is going about customizing the tester.tpl which governs the chart display option for the Strateg Tester. I find the default chart style very difficult to visualize. So, I created a new template and then built a script for replacing all arrows to more attractive arrows.
However, I'd also like to grab info in the arrow names and display that as text on the chart. The arrow names include stuff like "#62 buy" or "73 sell close". That way you can look at the chart and see exactly when a particular trade # is entered/exited. I don't know why this isn't included by default with the Strategy Tester as it is with other platforms (e.g. TradeStation).
Anyway, I'd like to grab the text in question and insert new text objects just below the existing arrows on the chart. But, I'm not figuring out how to accomplish this.
Bar counting always occurs right to left (present to past) in MQL correct?
How do I achieve past to present bar counting?
For a simple example, how would I go about numbering each bar in a given month with 1 representing the first bar of the month and subsequent bars incrementing up?
Thanks for any assistance.
Bill (still caught in a loop)
U should read about Date and Time functions, and use iBarShift function to get the shift of the first bar from specified month from specified timeframe.
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................ http://www.fxservice.eu/
........................................
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................ http://www.fxservice.eu/
........................................
One of my learning projects is going about customizing the tester.tpl which governs the chart display option for the Strateg Tester. I find the default chart style very difficult to visualize. So, I created a new template and then built a script for replacing all arrows to more attractive arrows.
However, I'd also like to grab info in the arrow names and display that as text on the chart. The arrow names include stuff like "#62 buy" or "73 sell close". That way you can look at the chart and see exactly when a particular trade # is entered/exited. I don't know why this isn't included by default with the Strategy Tester as it is with other platforms (e.g. TradeStation).
Anyway, I'd like to grab the text in question and insert new text objects just below the existing arrows on the chart. But, I'm not figuring out how to accomplish this.
How do I go about doing this?
Thanks
Bill
Well, u can write script, or function with will read arrow info and make text label bellow it. Then run the script each time when a new arrow is draw. Or just place the function at the end of main function of the ea. I dont know why this info isnt standard in metatrader, but it is simple to code that kind of functionality.
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................ http://www.fxservice.eu/
........................................
U should read about Date and Time functions, and use iBarShift function to get the shift of the first bar from specified month from specified timeframe.
I know it must be trivial for you. I'm just not getting it yet by following the limited documenation (not many examples provided there). Could you kindly provide an example for how to do this?
Well, u can write script, or function with will read arrow info and make text label bellow it. Then run the script each time when a new arrow is draw. Or just place the function at the end of main function of the ea. I dont know why this info isnt standard in metatrader, but it is simple to code that kind of functionality.
Thanks, but, I'm stuck specifically on how to code the script. If you have time to provide a short example, that would be most appreciated.
Not sure I follow. To be clear, I'm looking for a way to do a sub-string match based on an object name. Say for example I have a group of objects with the string "-206" in them (along with other text). I want to locate and delete all of the objects which contain "-206" in their name.
What's confusing me in the example below is the association with OBJPROP_TIME1, OBJPROP_TIME2 and OBJPROP_TIME3. I know objects can have up to three time coordinates. I'm not following how that fits in with what I'm trying to do.
Not sure I follow. To be clear, I'm looking for a way to do a sub-string match based on an object name. Say for example I have a group of objects with the string "-206" in them (along with other text). I want to locate and delete all of the objects which contain "-206" in their name.
What's confusing me in the example below is the association with OBJPROP_TIME1, OBJPROP_TIME2 and OBJPROP_TIME3. I know objects can have up to three time coordinates. I'm not following how that fits in with what I'm trying to do.
Ok , try this:
for(int i=0;i<ObjectsTotal();i++)
{
string name = ObjectName(i);
If the first 3 leters of the name of the object will be 206 then the object will be deleted
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................ http://www.fxservice.eu/
........................................