logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Leverage  
#1 Posted : Tuesday, March 19, 2013 9:29:12 AM(UTC)
Leverage

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 1/25/2010(UTC)
Posts: 44
Location: Rome, IT

Hi guys :)

I studying index options (or stock options), and I would like to associate the stike prices of an index in relationship with a trend indicator.

For example: if I write:

a1:=10000;
a2:=a1+500;
a3:=a2+500;
a1;
a2;
a3;

the indicator plotted are 3 horizontal lines at 500 points of distance of each one.
Is it possible, instead, to plot all the horizontal lines in a chart at 500 points of distance from each other in a unique code?

P.S. this is the first part of my intentions

Leverage  
#2 Posted : Wednesday, March 20, 2013 4:00:46 PM(UTC)
Leverage

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 1/25/2010(UTC)
Posts: 44
Location: Rome, IT

Sorry guys...

I think that my previous post is not so clear.
I try to re-explain the indicator who I would like to build:

Take the high and low values from one bar (for example) and calculate the average.
Simply: (H + L)/2
Suppose that the result is approximately 100, for example 98 and also the average of the next three bar are approximately 100.

Summarizing we have four values who ranging near 100. How can I plot the resultant indicator approximate at 100 value? (So, the indicator that connects the four point is a horizontal line at 100 value)

Thanks

wabbit  
#3 Posted : Thursday, March 21, 2013 2:25:57 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Code:

pr:=(H+L)/2;
avg:=mov(pr,4,s);

x:=int(avg/100)*100;

{plot}
x;



wabbit [:D]

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.