spacer esignallogo
 |  Contact Us   


User CPRegisterMember Listcalendar




eSignal Forums eSignal Forums » EFS / API Development » EFS Studies » eSignal EFS
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply

- Posted: 07-29-2010 09:21 AM Old PostReport | IP: Logged

tttay
Junior Member

Registered: May 2010
Location:
Posts: 10
Status: OFFLINE


Reply with QuoteEdit/Delete Message

Thanks. I'll check my codes again.

View tttay's profile Send tttay a Private Message Visit tttay's website Search for posts by tttay Add tttay to your buddy list


- Posted: 07-29-2010 05:51 AM Old PostReport | IP: Logged

waynecd
Member

Registered: Dec 2002
Location:
Posts: 525
Status: OFFLINE


Reply with QuoteEdit/Delete Message

Hi tttay,

They work as expected on my end.

xHigh.getValue(0) is the same as high( 0, inv("D") )

and

xHigh.getValue(-1) is the same as high( -1, inv("D") )

Try the script below to verify.

For performance try the different combinations using the "Tools-EFS-Performance Monitor" from the main toolbar in eSignal.

PHP:


function main(){
    
xHigh high(inv("D"));
    
vHigh_0 xHigh.getValue(0);
    var 
myVar_0 high0inv("D") );
    
vHigh_1 xHigh.getValue(-1);
    var 
myVar_1 high( -1inv("D") );
    
debugPrintln(xHigh+", "+vHigh_0+", "+myVar_0+", "+vHigh_1+", "+myVar_1);
}
/*
xHigh returns a series but if used in debugPrintln(xHigh) it returns the high for bar 0
vHigh_0 returns the high for bar 0
myVar_0 returns the high for bar 0
vHigh_1  returns the high for bar -1
myVar_1   returns the high for bar -1

debugPrint output follows:

xHigh  , vHigh_0, myVar_0, vHigh_1, myVar_1
1105.75, 1105.75, 1105.75, 1115.75, 1115.75
1105.75, 1105.75, 1105.75, 1115.75, 1115.75
1105.75, 1105.75, 1105.75, 1115.75, 1115.75
1105.75, 1105.75, 1105.75, 1115.75, 1115.75
1105.75, 1105.75, 1105.75, 1115.75, 1115.75
1105.75, 1105.75, 1105.75, 1115.75, 1115.75
1105.75, 1105.75, 1105.75, 1115.75, 1115.75
1105.75, 1105.75, 1105.75, 1115.75, 1115.75
*/


Wayne

Last edited by waynecd on 07-29-2010 at 06:14 AM

View waynecd's profile Send waynecd a Private Message Search for posts by waynecd Add waynecd to your buddy list


Determine Day High - Posted: 07-29-2010 04:01 AM Old PostReport | IP: Logged

tttay
Junior Member

Registered: May 2010
Location:
Posts: 10
Status: OFFLINE


Reply with QuoteEdit/Delete Message

Hi,

In determining the high price for the preceeding trading day in order to compute pivot points for the current day, the PivotPoint.efs supplied by eSignal uses the following functions:
xHigh = high(inv("D"));
vHigh = xHigh.getValue(-1);

In your EFS KnowledgeBase, http://kb.esignal.com/display/2/ind...898504614830017 (descriptions for inv() function), the example given to determine the high price is as follows:
var myVar = high( -1, inv("D") );

I tried out both, and I obtained different values. I would get the same values if I use a different offset
var myVar = high(0, inv("D") );

May I know what cause the differences? Also, in terms of execution efficiency, which one is preferred?

Last edited by tttay on 07-29-2010 at 04:41 AM

View tttay's profile Send tttay a Private Message Visit tttay's website Search for posts by tttay Add tttay to your buddy list


All times are GMT. The time now is 03:02 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread

Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF