OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniLanguage Discussion
OT09 Parser Changes
Last Activity 10/5/2024 12:51 AM
0 replies, 3607 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 

This thread is frozen and closed to further discussion

Printer friendly version

^ Top
Matthew Greenslet

Idol
2000252525
Posts: 2077

Joined: 2/27/2006

User Profile
 
Subject : OT09 Parser Changes
Posted : 12/3/2008 5:33 PM
Post #10710

OT2009 has a new parser over OT2008. The new parser alleviates a lot of the limitations in the old parser due to complex or nested formulas. The vast majority of the changes will not have any impact on existing scripts, however there are a couple that need to be pointed out.

One noticeable change is that variable values are now carried over to the next bar. On the old parser you need to specifically carry over values (MyVar = MyVar[1]) otherwise your variable would equal 0 on each new bar requiring you to set it explicitly. This is no longer necessary. However if your script relied on the variable to always = 0 on a new bar because of some conditional check before setting it, be sure to either initialize your variable in the deceleration or set the variable value to 0 at the very top of the script before any other logic.

There was also a change to the way exits are calculated. With exits on the old parser there is no way to set the internal exit level on the first bar. When you set ExitLevel = SomeValue the change is not applied till the next bar. This is to prevent cheating by changing your exit level while a bar is forming. To resolve this we start calculating the exit on the bar before the entry bar. This way you can do your calculations and set ExitLevel = SomeValue and it will be active for the first trading bar.
Note: This change is under review and could change back at a later date. Please click here to read more about the issues this might cause.

Another common question is "Why am I getting this compiler error 'C' not declared? This worked in OT08.". This is a result of an unsupported work around or 'hack' implemented of using C.Length to obtain the total number of data bars. This hack no longer slips past in the new parser. There is a new unsupported work around (hack) to correct this. Instead of using C.Length you can use SymbolData.NumRec. This is a hack as well and I cannot guaranty this will continue to compile in later revisions of the parser. If this happens I will request there be some other way to get this information, since it is important for several indicators.

This thread is frozen and closed to further discussion


Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.