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

Notification

Icon
Error

Options
Go to last post Go to first unread
dawsmit  
#1 Posted : Sunday, June 10, 2007 6:19:54 PM(UTC)
dawsmit

Rank: Member

Groups: Registered, Registered Users
Joined: 5/31/2007(UTC)
Posts: 15

Trying to create an expert advisor that uses an indicator that mimics the Standard Deviation Channel line study that comes as part of the MetaStock toolbar; have searched and found Jose Silva's 'Linear Regression Trendline and Channels/and Bars' formulas found on MetaStockTools.com (thanks Jose!)and they include an 'input window' for loading parameters and variables, etc.

Understanding that a linear regression trendline will change based on the beginning and end points, the input function ('input()') allows this to be set up accordingly. But can this type of construct be used in building an expert advisor? I envision attaching the expert advisor to a chart, and then modifying the expert with the use of an 'input window' to advise based on the Std Dev Channel I have drawn on the chart?

Please advise - any help will be appreciated!

wabbit  
#2 Posted : Sunday, June 10, 2007 7:57:33 PM(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)
dawsmit,

You cannot use the Input() function anywhere in MetaStock except for in indicators. Elsewhere, you need to hard code the variable. For example:

x := Input("Enter a value",1,100,50);

could be coded:

x := 50;


Each time you want to change the value of x, instead of editing the value from an "input window" you just edit the code directly.


Hope this helps.

wabbit [:D]


Jose  
#3 Posted : Monday, June 11, 2007 12:46:12 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Dawsmit, there is a way around the lack of available Input functions within MetaStock's Experts. I'm unable to post your code solution in this forum due to copyright issues. Please re-post your MetaStock query at the Traders' Consortium MetaStock forum, and I will personally take a good look at your request and offer a professional solution complete with charts and code setup file. jose '-)
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.