Delete older Text_New

Read before posting.
faraz
Posts: 144
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 57 times

Delete older Text_New

Postby faraz » 14 May 2014

Hi,

I want to keep the current Text_New and want to delete all older Text_New from older bars. Any suggestions Please....


Code: Select all

value1=432;
if lastbaronchart then Value1=Text_New(Date,Time,h,NumToStr(value1, 0));

Thanks

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Delete older Text_New

Postby Henry MultiСharts » 16 May 2014

Hello faraz,

Have you tried using text_delete?

faraz
Posts: 144
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 57 times

Re: Delete older Text_New

Postby faraz » 16 May 2014

Hello faraz,

Have you tried using text_delete?
Yes. It did not work.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Delete older Text_New

Postby Henry MultiСharts » 16 May 2014

Please attach a sample code and a detailed description of what exactly did not work.

faraz
Posts: 144
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 57 times

Re: Delete older Text_New

Postby faraz » 16 May 2014

Please attach a sample code and a detailed description of what exactly did not work.

I tried it like this, not worked

Code: Select all

value1=432;
Text_Delete(value1);
if lastbaronchart then Value1=Text_New(Date,Time,h,NumToStr(value1, 0));

Can you tell me how to delete New_text from -1 bar?

text_delete works on 0 bar it cann't delete new_text from previous bars.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Delete older Text_New

Postby Henry MultiСharts » 16 May 2014

faraz, you were passing an incorrect ObjectID to the Text_Delete.
Here is the proper code:

Code: Select all

if Value1> 0 then
begin
Text_Delete(Value1);
Value1 = 0;
end;

if lastbaronchart then Value1 = Text_New(Date,Time,h,Text(close:0:5));


Return to “MultiCharts FAQ”