Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 05-11-2009, 12:48 PM   #1

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,589
Ignore this user

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



ARW_new (MultiCharts)

This thread is about drawing an arrow on the chart. (MultiCharts enhanced EasyLanguage)



Arw_New

Displays an object, consisting of an up or a down arrow located at the specified bar and specified price value, on the chart that the study is based on; returns an object-specific ID number, required to modify the object.

Usage

Arw_New (BarDate, BarTime, PriceValue, Direction)

Parameters

BarDate - a numerical expression specifying the date of the bar at which the object is to be placed;
the date is indicated in the YYYMMdd format,
where YYY is the number of years since 1900,
MM is the month,
and dd is the day of the month

BarTime - a numerical expression specifying the time of the bar at which the object is to be placed;
the time is indicated in the 24-hour HHmm format, where 1300 = 1:00 PM

PriceValue - a numerical expression specifying the price value (vertical position,
corresponding to a value on the price scale of a chart), where the object is to be placed

Direction - a logical expression specifying the direction of the arrow;
True = Down and False = Up

Example

Place, on the chart that the study is based on, an up arrow at the top of a bar if the Open price has increased incrementally over the last three bars:

If Open>Open[1] And Open[1]>Open[2] Then
Value1 = Arw_New(Date, Time, High, False);


----------------------------------------------------------------------------

Arw_New_self

Displays the arrow on the SubChart.
Tams is offline  
Reply With Quote
The Following 5 Users Say Thank You to Tams For This Useful Post:
aaa (05-14-2009), jpflores (06-15-2009), Stat (02-19-2011), TIKITRADER (08-21-2010)
Old 05-11-2009, 01:00 PM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,589
Ignore this user

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: ARW_new (MultiCharts)

associated key keywords:


Arw_New_s
Arw_New_self_s

Arw_Delete

Arw_SetColor
Arw_SetLocation
Arw_SetLocation_s
Arw_SetSize
Arw_SetStyle
Arw_SetText
Arw_SetTextAttribute
Arw_SetTextBGColor
Arw_SetTextColor
Arw_SetTextFontName
Arw_SetTextSize
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
Old 05-11-2009, 08:58 PM   #3

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,589
Ignore this user

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: ARW_new (MultiCharts)

Here's a demo.

The arrow is placed when the short term moving average crosses the long term moving average.


Attached Thumbnails
ARW_new  (MultiCharts)-moving_average_2_lines_crossover.gif  
Attached Files
File Type: txt Moving_Average_2_Lines_Crossover.txt (650 Bytes, 38 views)
File Type: pla Mov_Avg_2_Lines_Crossover_(MultiCharts).pla (3.1 KB, 21 views)
Tams is offline  
Reply With Quote
The Following 4 Users Say Thank You to Tams For This Useful Post:
aaa (05-14-2009), Stat (02-19-2011), TIKITRADER (08-21-2010)
Old 05-16-2009, 03:53 PM   #4
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 440
Ignore this user

Thanks: 238
Thanked 278 Times in 135 Posts



Re: ARW_new (MultiCharts)

// author: aaa
// date: 20090516
// added all formatting possibilities

Attached Thumbnails
ARW_new  (MultiCharts)-snap2.jpg  
Attached Files
File Type: txt Moving Average 2 Lines Crossover Formatting.txt (1.5 KB, 34 views)
aaa is offline  
Reply With Quote
The Following 3 Users Say Thank You to aaa For This Useful Post:
Stat (02-19-2011), Tams (05-16-2009), TIKITRADER (08-21-2010)
Old 05-16-2009, 04:20 PM   #5
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 440
Ignore this user

Thanks: 238
Thanked 278 Times in 135 Posts



Re: ARW_new (MultiCharts)

Tams, It's nice to extract such interesting possibilitie

May I ask a question ?

After that avg.st crossed above avg.lt how to compute x points above the X and draw an other arrow?

Pseudo Code

if avg.st crosses above avg.lt = OK

if price > (OK + 3 points) then
id.arw = ARW_new(date, time, OK + 3 points [1], false);

if price > (OK + 5 points) then
id.arw = ARW_new(date, time, OK + 5 points [1], false);
aaa is offline  
Reply With Quote
Old 05-16-2009, 05:38 PM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,589
Ignore this user

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: ARW_new (MultiCharts)

each ID can only be used once per bar.
if you want another arrow on the same bar, you have to define another ID.

e.g.

var:
id.arw2(-1);

id.arw2 = ARW_new(date, time, OK + 3 points [1], false);

Last edited by Tams; 05-16-2009 at 06:02 PM.
Tams is offline  
Reply With Quote
Old 05-16-2009, 06:00 PM   #7

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,589
Ignore this user

Thanks: 2,026
Thanked 1,402 Times in 862 Posts



Re: ARW_new (MultiCharts)

let's take one step further:

...number converted to text... then added to the arrow.


Attached Thumbnails
ARW_new  (MultiCharts)-arw_text.gif  
Attached Files
File Type: txt MovAvg 2 Lines Xover Formatting text number.txt (1.5 KB, 26 views)

Last edited by Tams; 05-16-2009 at 06:58 PM.
Tams is offline  
Reply With Quote
The Following 3 Users Say Thank You to Tams For This Useful Post:
aaa (05-17-2009), Stat (02-19-2011), TIKITRADER (08-21-2010)
Old 05-16-2009, 06:22 PM   #8
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 440
Ignore this user

Thanks: 238
Thanked 278 Times in 135 Posts



Re: ARW_new (MultiCharts)

Nonono sir

It's my fault = my explanations are always complicates

Is it Better with a graph ?

Attached Thumbnails
ARW_new  (MultiCharts)-snap2.jpg  
aaa is offline  
Reply With Quote
The Following 2 Users Say Thank You to aaa For This Useful Post:
momentom (05-17-2009), Stat (02-19-2011)

Reply

Tags
arrow, easylanguage, moving average, trendline

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting OEC to MultiCharts spyro Open E Cry 13 12-08-2009 04:58 AM
MultiCharts Going GOLD Soon ! Tams Brokers and Data Feeds 16 05-27-2009 08:56 AM
Help Converting EFS to MultiCharts rdkyote Coding Forum 3 11-03-2008 10:41 AM
Multicharts ptop Beginners Forum 8 11-04-2007 06:38 AM
MultiCharts and OpenECry data brownsfan019 Brokers and Data Feeds 0 05-07-2007 08:04 PM

All times are GMT -4. The time now is 08:21 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.