eSignal efs Loop Code Snippet Convert to TS EZ Language

free & uncensored discussion arena for TheRumpledOne

Moderator: moderators

Ringo
rank: <50 posts
rank: <50 posts
Posts: 4
Joined: Sat Jun 10, 2006 7:25 pm
Reputation: 0
Location: Houston, TX
Real name: Ringo LaGuerre
Gender: None specified

eSignal efs Loop Code Snippet Convert to TS EZ Language

Postby Ringo » Thu Sep 13, 2007 1:00 am

[font=Tahoma]Hi TRO,

I'm trying to write a new indicator for Tradestation and converting part of it from eSignal efs code. I know you are quite adept at both languages while I am just learning. I was hoping maybe you could help me convert the following loop line from eSignal efs to Tradestation easy language.

for(i = -bars; i < 0; i++)

If you have time to help me with this conversion I greatly appreciate it. I will be happy to post the indicator on the Kreslik forum once I'm done. Thanks in advance for your help.

Regards,

Ringo LaGuerre[/font]

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

Ringo
rank: <50 posts
rank: <50 posts
Posts: 4
Joined: Sat Jun 10, 2006 7:25 pm
Reputation: 0
Location: Houston, TX
Real name: Ringo LaGuerre
Gender: None specified

Postby Ringo » Tue Sep 25, 2007 2:32 am

Hi all,

Well, to date I didn't get any kind of response to my intial request. Perhaps I didn't provide enough information for the indicator I'm trying to code in EZ language by converting part of it from eSignal. So, I will post the entire eSignal function in hopes that I can get some help in converting it to Tradestation easy language. Thanks in advance.

function hh(bars){
var i = 0;
hv = high();
for(i = -bars; i < 0; i++)
if(high(i) > hv)
hv = high(i);
return hv;
}

I am nearly done with it. As soon as I get it completed I will post here on the site. Any help would be greatly appreciated.

Regards,

Ringo

obx
rank: <50 posts
rank: <50 posts
Posts: 41
Joined: Fri May 26, 2006 12:35 pm
Reputation: 0
Gender: Male

Postby obx » Tue Sep 25, 2007 11:57 pm

Ringo,

{function hh(bars)
var i = 0;
hv = high();
for(i = -bars; i < 0; i++)
if(high(i) > hv)
hv = high(i);
return hv;


to
EL fHH function }

//Code
inputs:
nLen(numericsimple)
;

vars:
i(0),
hv(h)
;

for i = 0 to nLen begin
if(high[i] > hv) then
hv = high[i];

end; // for i = 0 to nLen

fHH = hv;
//Code

It looks like this is the equivalent of using EL built in function of Highest
Syntax like Highest(h, nLen) should rtn same as the fHH(nLen)

hth

Ringo
rank: <50 posts
rank: <50 posts
Posts: 4
Joined: Sat Jun 10, 2006 7:25 pm
Reputation: 0
Location: Houston, TX
Real name: Ringo LaGuerre
Gender: None specified

Postby Ringo » Wed Sep 26, 2007 2:04 am

[font=Courier New]Hi OBX,

Thanks very much for the code. For some reason, I cannot get a plus symbol to display on this reply. So I just typed it all out "plus".

Originally I had created a function and I wrote this code to try and convert it to easy language in this manner:

Input: bars (numericsimple) ;

Vars: i ( 0 ) ,
hv ( high ) ;

If bars = 0 then
i = ( bars - 1 ) ;

For i = bars to i plus 1
Begin
If High[ i ] > hv then
hv = High [ i ] ;
End ;

hh = hv ;

What's interesting about the eSignal function is that it doesn't pass on a length to the function. Bars is actually equal to 0. So I tried to convert it without passing on a length even though I'm not sure how one can figure out a high without knowing the length back to measure the high. The eSignal line for ( i = -bars; i < 0; i plus plus ) has me abit perplexed. The i plus plus I'm almost certain means increment i to i plus 1. Needless to say the results with the above code I wrote didn't churn out the desired result.

Some days ago I did write a function that passed a length of nbars to the function. It worked ok but it was not plotting identitically to the eSignal code I posted in the previous posts, although it was quite close. Perhaps the two code engines between eSig and Tradestation make it impossible to duplicate it plot for plot.

I was thinking an ace like TRO might be able to assist. While I'm fairly good at writing code and usually get things to work as needed, this one has me stumped. Thanks again for your time and assistance.

Kind regards,

Ringo[/font]

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “TheRumpledOne”