Plotting marker when conditions are met?

Questions about MultiCharts and user contributed studies.
billco
Posts: 15
Joined: 30 Nov 2006

Plotting marker when conditions are met?

Postby billco » 30 Nov 2006

I'm new with easylanguage, and in using the example below as a learning aid, I have finally been able get the following to compile successfully after umpteen tries and lot's of reading. However, I can't seem to figure out how to write the line of code to get the function to plot an arrow on the chart at the low when the two conditions are met.


Condition1 = the low is < the lowest (low, 3) of 1 bar ago;
Condition2 = the close is > the close of 1 bar ago;
If Condition1 and Condition2 Then *???* (low);


If someone here would be so kind, what do I need to add/edit in line 3 to get an arrow to plot at the low when both conditions are met, and what code is needed to describe the marking?


Thanks in advance for guidance you may be able to forward.

billco

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 01 Dec 2006

Power Language allows you to draw arrows. There are several reserved words for this: arw_new, arw_setcolor, arw_setstyle, arw_setsize, arw_settextbgcolor, arw_settextcolor, arw_settext. Here is the sample code for your convenience:

Code: Select all

var: id(0);

Condition1 = the low is < the lowest (low, 3) of 1 bar ago;
Condition2 = the close is > the close of 1 bar ago;
If Condition1 and Condition2 Then begin
            id = arw_new(d,t,l,false);
            arw_setcolor(id,green );
            arw_setstyle(id, 10);
            arw_setsize(id, 3);
            arw_settextbgcolor(id, green);
            arw_settextcolor(id, black);
            arw_settext(id, "Long Breakout");
end;

plot1(close);

billco
Posts: 15
Joined: 30 Nov 2006

Postby billco » 01 Dec 2006

Thanks for filling in the blanks!

Regarding Power Language, where may I find a reference manual?

Thanks again for the help!

b

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 01 Dec 2006

MultiCharts' PowerLanguage is fully compatible with TS EasyLanguage. So you can review original EasyLanguage tutorials to learn more about basic conceptions and syntax options. Please check our Online Tutorials section for further details:

http://tssupport.com/support/tutorials/

t123knight
Posts: 50
Joined: 11 Nov 2005
Contact:

Postby t123knight » 05 Dec 2006

How can I have the arrow be placed one bar before the actual signal bar? In other words, I just want to move the arrow one bar back.

I hope this makes sense.

Thanks,

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 05 Dec 2006

The arw_new function contains Date, Time, Price and Up/Down parameters. You can change Date/Time parameters and draw the arrow on any bar.

id = arw_new(d,t,l,false);

Guest

Postby Guest » 05 Dec 2006

thanks, that worked well

Guest

Postby Guest » 18 Dec 2006

is there a reserve word for deleting an arrow? I want to remove an arrow if another one is ploted.

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 19 Dec 2006

arw_delete(id)l;


Return to “MultiCharts”