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

Notification

Icon
Error

Options
Go to last post Go to first unread
ClaudeBrunet  
#1 Posted : Monday, June 18, 2012 3:30:58 AM(UTC)
ClaudeBrunet

Rank: Member

Groups: Registered, Registered Users
Joined: 5/22/2012(UTC)
Posts: 19

Hi, i like to program a dll that can extracts values from Metastock chart ,calculates , and sends the result of calculation to another chart. so i program 2 functions:GetVariables and Setvariables with power basic, the problem that i can't use variables extracted in getvariables function in setvariables function. is it necessary to load data in a text file to can use it??? Metastock-->Powerbasic-->Textfile-->PowerBasic -->Metastock it's very long,may be it exist another solution. i don't like to use gv.setvar and gv.getvar because i like to send 3 variables and to receive the result of calculation. thanks by advance
mstt  
#2 Posted : Monday, June 18, 2012 4:02:18 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Claude

Until you get your DLL working I think the existing GlobalVar DLL is the best there is. I may be able to help if you can explain your need a little more clearly as I have managed to solve one or two problems with the GV DLL in the past. So far, though, it's not clear what you're trying to achieve or the process you're following to get there.

Roy
ClaudeBrunet  
#3 Posted : Monday, June 18, 2012 10:08:02 AM(UTC)
ClaudeBrunet

Rank: Member

Groups: Registered, Registered Users
Joined: 5/22/2012(UTC)
Posts: 19

Hi Mstt Thank you very much for your replay. i will explain to you what i like to do and i hope you can help me. i like to send the moving average of the close ,the date and the time from the dax future to the dax indice . on the dax indice i calculate the moving average of the close and i compare it with the value sended from the dax future corresponded to the same time and the same date. i try to do this with gv.dll so i send the moving average, the date,the time with the function gv.setvar i extract the moving average corresponding to the date and the time with the function gv.getvar but when i compare (date,time,moving average) i found that' the result of comparison is false. because there is not this syntaxe in metastock . For (i=0 to n) begin end i wait for your help thank you by advance. regards
wabbit  
#4 Posted : Wednesday, June 20, 2012 3:27:24 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)
You can use the Security() function. wabbit [:D]
ClaudeBrunet  
#5 Posted : Wednesday, June 20, 2012 7:11:00 AM(UTC)
ClaudeBrunet

Rank: Member

Groups: Registered, Registered Users
Joined: 5/22/2012(UTC)
Posts: 19

Hi Wabbit, Thank you for your replay. i tried to use security but it's not the best solution if i use two securities with different interval time.
mstt  
#6 Posted : Wednesday, June 20, 2012 3:21:25 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Claude

Sorry for not getting back to you earlier. The GV DLL is not suitable for what you're trying to do. The problem is that a GV data array is simply that - a data array without any date or time tags. For the most part it can only be used between securities when those securites have the same number of bars loaded, and identical dates and times for corresponding bars. There are some situations where date/time variations can be overcome, such as when accumulating or counting a series of "last values" where any degradation of the GV data array can be corrected by the next SetVar function. But in a bar-on-bar situation any mismatch results in the loss of one or more cells and the data from those "N/A" cells cannot be accessed or recovered.

Roy
ClaudeBrunet  
#7 Posted : Thursday, June 21, 2012 7:18:05 AM(UTC)
ClaudeBrunet

Rank: Member

Groups: Registered, Registered Users
Joined: 5/22/2012(UTC)
Posts: 19

Hi,Mstt, Thank you for your replay MSTT. have you any ideas to communicate charts, i don't like to use securities because at this time i can't use two securities with different times intervals . i succeed to code a dll that it send date, time,average close from a chart and compare this data with date,time,average close from other chart it work fine with MSXTest but it blocks Metastck. i wait for your ideas. :) Thanks by advance
mstt  
#8 Posted : Thursday, June 21, 2012 3:46:21 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Claude

I don't see why the Security() function won't work for you. If the security being called has a lower or equal periodicity to the current chart then it will display at the periodicity of the current chart. My understanding is that the Security() function calls from the underlying data, not a chart. This means that the Security() function can plot as low a periodicity as the underlying data feed if your current chart is at that same periodicity

The only suggestion I can make is that you might be able to achieve what you want by using my Multi-Frame ID series of formulas in combination with the Security() function. This would allow you to plot higher timeframe prices or indicator values on the current chart. The lowest possible periodicity of the Multi-Frame signal would the higher of the current chart or the other security's data feed.

You might like to experiment with a Multi-Frame indicator by downloading the demo ZIP file from www.metastocktips.co.nz/multi_frame_ma_demo.zip. In it there's a self-installing EXE file with demonstration EMA, SMA and WMA Multi-Frame indicators for both intraday and EOD use (from the "ID" and "D+" series of indicators). These formulas are password protected and time limited. There's no guarantee that they will help but it's probably worth a try.

The syntax for calling the Multi-Frame indicator value looks like this with the appropriate pathname and ticker being added.

Security("Pathname icker",Fml("Multi-Frame ID SMA Demo"));

I think the demo ID timeframe is set to 30 minutes and that can only be changed if you have the password. If this doesn't help then you need to get back to Wabbit.

Roy
ClaudeBrunet  
#9 Posted : Monday, June 25, 2012 2:36:15 AM(UTC)
ClaudeBrunet

Rank: Member

Groups: Registered, Registered Users
Joined: 5/22/2012(UTC)
Posts: 19

Hi MSTT I will try with security and i hope that works, Thank you for your help :)
gabibbo  
#10 Posted : Tuesday, June 26, 2012 4:22:40 PM(UTC)
gabibbo

Rank: Member

Groups: Registered, Registered Users
Joined: 1/4/2006(UTC)
Posts: 21

Thanks: 1 times
Hi Claude,

I remember that some years ago a couple of DLL were proposed here in this forum; both included functions whosw task was to plot data arrays from a higher TF to a lower one, in intraday chart too.
If you do a search I think it shouldnt be so difficult to find them and the relative 3Ds... their names... TMW and alchan78... Personally I rate TMW higher even if it showed some problems with some TF multiplier factors, anyway try both as you could find one better than the other.

Cheers

Marco
ClaudeBrunet  
#11 Posted : Friday, June 29, 2012 2:56:28 AM(UTC)
ClaudeBrunet

Rank: Member

Groups: Registered, Registered Users
Joined: 5/22/2012(UTC)
Posts: 19

Thank you Marco. i will try to code dll that can do what i want. it's better to have my own dll ,it allows me to progress in programming indicators .
Users browsing this topic
Guest (Hidden)
Similar Topics
Save / Restore global variables between sessions (Tips & Tricks)
by Henry R. Weber 11/29/2013 1:14:11 AM(UTC)
Global Variable Problem ? (Formula Assistance)
by Gregor 7/25/2011 2:34:44 PM(UTC)
explain global variable sytnax (MetaStock)
by Gregor 5/30/2011 9:37:48 AM(UTC)
Global Variables - GV.dll - Anyone have a copy or equivalent? (Formula Assistance)
by forexweather 3/4/2009 2:06:14 PM(UTC)
Indicator Question: Global variable (Formula Assistance)
by garp 3/1/2008 11:46:55 PM(UTC)
Global Variable (Formula Assistance)
by uasish 6/16/2007 1:30:24 PM(UTC)
Using Securities as Global Variables (Similar to GV) (Formula Assistance)
by Spaceant 9/14/2006 11:11:15 AM(UTC)
Global Variable in System Editor [RESOLVED] (Formula Assistance)
by Henning 8/15/2005 12:52:31 PM(UTC)
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.