| New signals service! | |
|
|||||||
| 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 (2) | Thread Tools | Display Modes |
|
|||
|
counting bars past to present
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) |
|
|||
|
contains-based object deletion
Is there a way to delete objects based on a select text string within the object name?
Edit: Figured it out with pointer from Kalenzo. Answer is in post #212. Last edited by billworld2; 08-01-2006 at 03:30 PM. |
|
|||
|
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. How do I go about doing this? Thanks Bill |
|
||||
|
Quote:
__________________
You need proffesional mql coder? Contact me! I will help you! ........................................ http://www.fxservice.eu/ ........................................ |
|
||||
|
Quote:
datetime currentDay = StrToTime(Year()+"."+Month()+"."+Day()+" 00.00"); for(int i=0;i<ObjectsTotal();i++) { string name = ObjectName(i); if( ObjectGet(name,OBJPROP_TIME1) < currentDay && ObjectGet(name,OBJPROP_TIME2) < currentDay && ObjectGet(name,OBJPROP_TIME3) < currentDay) { ObjectDelete(ObjectName(i)); return (false); } } return(true);
__________________
You need proffesional mql coder? Contact me! I will help you! ........................................ http://www.fxservice.eu/ ........................................ |
|
||||
|
Quote:
__________________
You need proffesional mql coder? Contact me! I will help you! ........................................ http://www.fxservice.eu/ ........................................ |
|
|||
|
Quote:
Thanks Bill |
|
|||
|
Quote:
Thanks again. Bill |
|
|||
|
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. Quote:
|
|
||||
|
Quote:
for(int i=0;i<ObjectsTotal();i++) { string name = ObjectName(i); if(StringSubstr( name, 0, 3)==206) { ObjectDelete(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/ ........................................ |
![]() |
| Bookmarks |
| Tags |
| histogram, forex |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
|
||||
| Posted By | For | Type | Date | |
| OzFx System:) - Page 639 | This thread | Refback | 06-21-2008 09:53 PM | |
| Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart | This thread | Refback | 12-08-2007 11:46 AM | |