MisterDog: Tell me, is there way to use some sort of a "wildcard" for things like the ObjectDelete? I would like to do something like this, ObjectDelete("tensLines"*); in other words, delete anything that starts with "tensLines".
Not compiled, not tested.
Also there's no reason to delete them, just move them to the new position. From my code:
RaptorUK: Why not add PERIOD_W1 * 60 to the end time ? that should just about cover any gaps . .. ;-)
Why not just project the rectangle all the way into the future?
I like RaptorUK's approach. I think there is no "wildcard" feature for deleting objects like you describe. I think you need to go through a loop using ObjectDelete. But also check out ObjectsDeleteAll. I have a script that clears everything off the screen.
I dislike ObjectsDeleteAll() immensely . . . I don't want someone's Indicator to delete MY objects . . . it can happily delete it's own but leave mine alone !
RaptorUK: I dislike ObjectsDeleteAll() immensely . . . I don't want someone's Indicator to delete MY objects . . . it can happily delete it's own but leave mine alone !
Ah yes, understood, you don't like being greedy, so ObjectDeleteAll() == Greedy, right ?
Also there's no reason to delete them, just move them to the new position. From my code:
RaptorUK: Why not add PERIOD_W1 * 60 to the end time ? that should just about cover any gaps . .. ;-)
Why not just project the rectangle all the way into the future?
Could anybody who already put these code snippets together to make the horizontal price bars post their version here pls? I did used to code C language and can kind of understand whats in the code ,but not familiar with most of the include library in MT and Im getting stuck.
Could anybody who already put these code snippets together to make the horizontal price bars post their version here pls? I did used to code C language and can kind of understand whats in the code ,but not familiar with most of the include library in MT and Im getting stuck.
That's the best way to learn . . . out of necessity.
If i wanna make this indicator start at euro open time and calculate from that open 13 pips up and down, maybe we can use trend lines and make it start at euro open and ends at America close.anyone can help with that?
spent another half day on it, and can so far get a rectangle that has 3 things wrong with it. :|
WHRoeder wrote:
Why not just project the rectangle all the way into the future?
#define INF 0x6FFFFFFF// Not quite infinite, Jul 2029, or 1,879,048,191ObjectSet("tensRec"+ix,OBJPROP_TIME2,INF);
my indicator doesnt project to the right of the current candlestick [at all] using any of: 0x6FFFFFFF, -100, +100, -1, +1
Also if I zoom out on the graph too far [maybe showing 500-1000 candles] the grey bar completely disappears to the right of the first candle.!
Here is the rectangle create and move parts of my code:
I know it still needs a lot to make it complete but just trying to get the basics of creating 1 rectangle where I want it and continue making the rest of the code from there
ObjectCreate("Rect02", OBJ_RECTANGLE, 0, Time[0], Bid, Time[Bars], (Bid+0.0010) ); //make bar above cur price
ObjectSet("Rect02", OBJPROP_COLOR, Silver );
}
//================= Move the Rect with new ticks/candles ===========================else {
ObjectMove("Rect01", 0, Time[0], WindowPriceMin()*0.95);
ObjectMove("Rect02", 0, Time[0], Bid);
}
Tell me, is there way to use some sort of a "wildcard" for things like the ObjectDelete? I would like to do something like this, ObjectDelete("tensLines"*); in other words, delete anything that starts with "tensLines".
Why not add PERIOD_W1 * 60 to the end time ? that should just about cover any gaps . .. ;-)
I dislike ObjectsDeleteAll() immensely . . . I don't want someone's Indicator to delete MY objects . . . it can happily delete it's own but leave mine alone !
Ah yes, understood, you don't like being greedy, so ObjectDeleteAll() == Greedy, right ?
Why not add PERIOD_W1 * 60 to the end time ? that should just about cover any gaps . .. ;-)
Could anybody who already put these code snippets together to make the horizontal price bars post their version here pls?
I did used to code C language and can kind of understand whats in the code ,but not familiar with most of the include library in MT and Im getting stuck.
Could anybody who already put these code snippets together to make the horizontal price bars post their version here pls?
I did used to code C language and can kind of understand whats in the code ,but not familiar with most of the include library in MT and Im getting stuck.
If i wanna make this indicator start at euro open time and calculate from that open 13 pips up and down, maybe we can use trend lines and make it start at euro open and ends at America close.anyone can help with that?
Anyone else got this to work that can help?
spent another half day on it, and can so far get a rectangle that has 3 things wrong with it. :|
WHRoeder wrote:
Result looks like this:
Write WHRoeder code on top of your CI and change your Time [0] to INF
#define INF 0x6FFFFFFF // Not quite infinite, Jul 2029, or 1,879,048,191