OmniTrader Forum OmniTrader 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 Upgrade Forums
OmniTrader Frequently Asked Questions
How can I fix OmniLanguage Compile Errors?
Last Activity 1/5/2024 11:23 AM
0 replies, 581 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
Barry Cohen

Sage
5000100010010010025
Posts: 6338

Joined: 1/19/2004

User Profile
 
Subject : How can I fix OmniLanguage Compile Errors?
Posted : 8/22/2023 10:54 AM
Post #48851

Q: How can I fix OmniLanguage Compile Errors?

A:


With OmniTrader's vast customization options, you may find yourself at some point with a compile error message on startup or a bunch of things you're used to seeing have stopped working inside the software. These are the steps to take to fix it!

1. Click Tools -> Cleanup VBA (OT only). This function will remove temporary files that are no longer needed that may still be seen by OT's compiler. It will not delete any custom OmniLanguage or other custom files, so there is no risk running this. It is usually completed within seconds.

2. Click Edit -> OmniLanguage. Then click Compile. Ideally you are looking for the message, "Build completed." That means everything has compiled successfully, & you should not have any compile related errors. You do not need to proceed with this FAQ. Otherwise it will end with the message, "Build failed."

There are some situations where you may want to force OT to recompile everything. To do that in OmniLanguage, click Build -> Recompile All Projects.

3. Before the "Build failed" message you may have anywhere between one failure or many. When there are many failures, typically the issue is that one file is failing to compile & as a result everything else that uses OmniLanguage is also failing. In most cases you will need to scroll up or resize to get to the important piece of information.

Use the Scroll bar to scroll up or resize the form so you can see more. Here is what it might look like after a compile error.



Then scroll up or resize to see the first thing it has trouble with at the top.



4. There are many different compile failures that may occur, but here are some examples to help you fix most of them. You may decide to fix them by deleting or fixing the problem files. The most important piece of any compile error is at the top above the “Microsoft ® Visual Basic Compiler” line. It will tell you if it’s a strategy, scan, method, etc. If the problem is a bad OmniLanguage indicator, system or stop, this line will not show & it will then just display the word "Global" or the actual filename.

EXAMPLE #1.

From this example, it’s telling us that the problem is coming from an OmniScan & the scan is called “KB Squeeze.” Additionally, “KB_32_Squeeze_Sort_1” tells us the issue is with the Sort Value of the scan. 32 just means a space. “gggggg” is the invalid line, & “not declared” in this situation usually means that the OL file does not exist. So, from all this we can infer that there is an OmniScan called “KB Squeeze” & it has a Sort Value condition, “gggggg” that’s missing & as result fails to compile.



We can confirm the Sort Value issue if we look at the scan. To fix it, we can either delete the scan, delete the Sort Value, or try to find the OmniLanguage file “gggggg”.



EXAMPLE #2.

From this example, it’s telling us that the problem is coming from a Strategy called “OL Testing.” Additionally, “OL_Testing_Filter_Close_Range_Long” tells us not only that the issue is with that Strategy’s Filter block, but also if it’s the Long or Short condition & the name of the filter condition within the Filter block which in this case is “Close Range.” “RisingPeriod” is the invalid line, & again “not declared” in this situation usually means that the OL file does not exist. So, from all this we can infer that there is a Strategy called “OL Testing” & it has a Filter block with a filter condition titled “Close Range” & both the long & short conditions for it are referencing an OL file called “RisingPeriod” which is missing & as result fails to compile.



If we look at the Strategy’s Filter, we can confirm everything above. Now to fix it, we can either delete the Strategy, delete the filter condition, or try to find the OmniLanguage file “RisingPeriod”.



EXAMPLE #3.

This first example says it's an ITS file. ITS is another term for an ATS or ATM Method. In this example we can infer that there is an ATM method called “Trend Reversal” & it has a Long Filter condition titled “OL Test” & it's referencing an OL file called “RisingPeriod” which is missing & as result fails to compile.

This second example says it's a Color Chart, & a Color Chart can only exist within a Chart Template. In this example we can conclude that there is a Chart Template called “MySwing” & it has a Color Chart condition referencing an OL file called “RisingPeriod” which is missing & as result fails to compile.

The solution to fix both of these is the same. We can either delete the ATM method / Chart Template, delete the filter condition / Color Chart, or try to find the missing OmniLanguage file “RisingPeriod”.



EXAMPLE #4.

From these examples, it is not referencing a file type. What this means though is that the problem is coming from an OmniLanguage file & not from something else using it. There are many different reasons that an OL file might fail to compile, these are just a couple examples. We do not know if it is an indicator, system, or stop, but we do know that the offending OL file is called RBSignal, & we know it exists & that OmniTrader is not able to compile it due to the OL code within it.

To correct the issue, we need to locate it first. You may look in your list of indicators, systems, & stops to find it. To fix it, we can either delete the OL file or try to fix the code within it.



EXAMPLE #5.

From these examples, like the previous example, it is not referencing a file type. Again, what this means though is that the problem is coming from an OmniLanguage file & not from something else using it. We do not know if it is an indicator, system, or stop, but we do know that the offending OL file is called RBSignal, & we know it exists & that OmniTrader is not able to compile it due to the OL code within it. We get a little more information in these examples however. In the first, we can see that there is a variable within the OL file that is not declared, which is typically something done near the top of the OL code with the line beginning with “DIM.” In the second, it tells us that we need to specifically look at line 13 within the OL code.

To correct the issue, we need to locate it first. You may look in your list of indicators, systems, & stops to find it. To fix it, we can either delete the OL file or try to fix the code within it.




Attached file : Method & Template Compile.jpg (112KB - 241 downloads)
Attached file : OL Bad File.jpg (96KB - 240 downloads)
Attached file : OL Before.jpg (16KB - 245 downloads)
Attached file : OL Scroll or Resize.jpg (72KB - 238 downloads)
Attached file : OmniScan Compile1.jpg (69KB - 234 downloads)
Attached file : OmniScan Compile2.jpg (67KB - 232 downloads)
Attached file : Strategy Compile1.jpg (89KB - 226 downloads)
Attached file : Strategy Compile2.jpg (60KB - 225 downloads)
Attached file : OL Typo.jpg (55KB - 225 downloads)

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

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.