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 Archives
OmniTrader 2018 Technical Support
Serious Issue with OmniLanguage Stops
Last Activity 5/11/2020 10:43 AM
22 replies, 1717 viewings

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

^ Top
Vinay

Elite
50010025
Posts: 640

Joined: 12/9/2011
Location: Planet Earth

User Profile
 
Subject : Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 5:29 AM
Post #45421

If we change the value of a parameter from the default in a OmniLanguage Stop in a Trade Plan then we get different results when we restart OT and do analysis again. It appears that after restart OT takes the default parameter value and ignores the changes made by us, although the Trade Plan continue to show the changed parameter values. Now if we go to OmniLanguage IDE and compile all projects (even compiling only the Stop used in Trade Plan is enough) then run the analysis, it gives different results which are based on changed parameters.

To rule out any bugs in my Stop causing this issue, I have confirmed my findings with a Stop created by Jim Dean (whom I consider the ultimate authority on OL coding) and another Stop created by Nirvana themselves. I have attached both Stops for easy access. (Hope Jim will not mind).

To keep things simple I used MOO for both entries & exits in my Trade Plans.

Now to reproduce this issue please follow the following steps:

1. Create a simple strategy with any System with a Trade Plan using only the OL Stops.

2. Change any parameter which is likely to cause significant change in result. (Changing parameter is important).

3. Now exit OT and delete all files in the following directories because we want to start with clean slate:

i) C:\Program Files (x86)\Nirvana\OT2018\VBA\Temp.
ii) C:\Program Files (x86)\Nirvana\OT2018\VBA\Strategies
iii) C:\Program Files (x86)\Nirvana\OT2018\Results

4. Now launch OT and perform ToDoList analysis and save the Performance Summary Report.

5. Now go to OmniLanguage IDE and compile all or just the Stops used in the strategy.

6. Run analysis again and check the Performance Report. You will find differences from the first run.

7. If you check the Voteline carefully you will finds differences at several places compared to previous run.


I always had difficulty in relying on the OT analysis results due to its complexity and inability of Nirvana to fix known bugs even after several years. After this discovery my confidence in OT analysis results has hit a new all time low.

In past also I had noticed changed exit signals but I could not figure out the circumstances under which this happens. Now it's clear that its a serious bug which makes all our past analysis which we has done laboriously spending countless hours is suspect and can not be relied upon.



[Edited by Vinay on 9/19/2018 9:24 AM]

Attached file : Stops.zip (2KB - 308 downloads)

^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 7:43 AM
Post #45422 - In reply to #45421

This looks troubling.

Where you able to confirm that by returning the adjusted value back to its original default that the values matched those of the run right after a restart?

^ Top
Vinay

Elite
50010025
Posts: 640

Joined: 12/9/2011
Location: Planet Earth

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 8:14 AM
Post #45423 - In reply to #45421

Yes... I tested with default values also and didn't found any problem. So it appears that the problem arises when we change the default parameter values.

One thing more...there seems to be no problem if we change the default parameter values of Nirvana supplied Stops.

However I must add that the above conclusions are based on my limited testings. I hope other users will also do their own testings and chime in with their findings.


[Edited by Vinay on 9/19/2018 8:52 AM]

^ Top
Hafnium

Regular
2525
Posts: 74

Joined: 1/1/2004
Location: Fairfax, VA

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 8:33 AM
Post #45424 - In reply to #45423

Hi Vinjay

This issue does look familiar (ie.. a few years ago I saw something similar). In your step 2,
When you change your trade plan parameter, suggest that you use the Save As command and save the modified Trade Plan (template) under a new name. This creates a new trade plan (making the change while in the strategy without renaming the trade plan only changes the trade plan template, not the actual trade plan - or I might have the terminology reversed). Let us know if that works. In the past, the issue was that OT would somehow revert back to the trade plan parameters, and would ignore the trade plan template parameters. That issue was previously fixed some time ago.
^ Top
Vinay

Elite
50010025
Posts: 640

Joined: 12/9/2011
Location: Planet Earth

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 8:50 AM
Post #45425 - In reply to #45421

Hafnium...I am not completely following what you are trying to say, but I have not used any Trade Plan Template, but created new Trade Plan with just MOO entry and one OL Stop with MOO exit.


^ Top
Hafnium

Regular
2525
Posts: 74

Joined: 1/1/2004
Location: Fairfax, VA

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 9:52 AM
Post #45426 - In reply to #45425

Vinjay
Any trade plan within a strategy is a trade plan template.
Any changes that you make to the trade plan within a strategy only changes that template - unless you use "save as" and rename it to a new trade plan.



^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 9:57 AM
Post #45427 - In reply to #45426

But shouldn't that create essentially a local copy unique to that strategy? What I mean is that if it is "Based on Default", but you save the strategy after altering the TP block to add the Stop Loss, it becomes unique to that strategy and no longer "Based on Default", but rather a trade plan unique to that strategy.

I'd then expect that if I use that strategy, it would use the unique settings I saved as part of that strategy without saving the TP as a new trade plan and then using the drop down to access it. Isn't that how it works (or is supposed to work)?
^ Top
Vinay

Elite
50010025
Posts: 640

Joined: 12/9/2011
Location: Planet Earth

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 10:04 AM
Post #45428 - In reply to #45421

jpb is right. Once a Strategy with a Trade Plan (which is based on a Trade Plan Template) is saved, it no longer have any connection with the Trade Plan Template on which it is based. Any changes made to the TP in the strategy is applicable to that unique instance of TP only and has no bearing or connection with the original TP Template.

^ Top
Hafnium

Regular
2525
Posts: 74

Joined: 1/1/2004
Location: Fairfax, VA

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 11:38 AM
Post #45429 - In reply to #45428

Hi Vinjay
What you said is True - "Any changes made to the TP in the strategy is applicable to that unique instance of TP only and has no bearing or connection with the original TP Template". The old "bug" that I am referring to prevents that. OT was going back to the original TP template, and ignoring the changes made to the Trade Plan in the strategy.

If thats the problem then its fairly easy to work around it. Suggest that you go back to my original suggestion , which was to use "SAVE AS" after you make any Trade Plan changes while in the Strategy. That will create a new "global template" (which is the terminology that Barry used recently in a different thread). Then when OT goes back to the original Global Template - that template will have the same settings as the local Trade Plan.
^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 12:12 PM
Post #45430 - In reply to #45429

I've confirmed what Vinjay has reported. When adjusting an OL Stop via the interface in the Strategy for a Trade Plan, the changes take effect for that session of OT. Once you restart OT, the TP in the strategy retains the added OL Stop (which wasn't in the Default TP used when creating the original Strategy), however, it reverts the settings to the default during OT startup compile, ignoring the adjustments made. So, effectively, the startup compile used by OT uses the defaults specified in the OL script instead of the adjustments made in the TP stored in the strategy.

However, when you manually issue a compile via the OmniLanguage interface, the changed settings found in the strategy once again are applied.

My steps to reproduce:
1) Delete the files per Vinjay's original post.
2) Start OT and construct a strategy where the TP block has one stop loss stop based on your OL scripts. I also configured the ToDo list to include only this new strategy to prepare for the run.
3) Shutdown OT and delete the files again.
4) Start OT and run the test using the new strategy with the default OL Stop parameters.
I saved off the performance reports (summary and detail) for the Baseline.
I then switched to Port Sim, ran the analysis and captured all trades and statistics report.
5) Returning to Live mode, I modified the strategy's TP to adjust the parameters. I used 2, 2, 2, 0.1, 0 in that sequence which modified a number of the default parameters. The values don't matter other than a change occurred. I then clicked OK on the TP window and OK on the Strategy window.
6) Execute a second ToDo list run, clicking Force for All Symbols. This clears out the results from the prior run.
I captured the same 4 basic reports as in step 4, saving them as Run2. I observed a significant change in results.
7) Shutdown OT. I captured the OT.log and included it in the attached zip.
8) Restart OT. Execute a third ToDo list run, checking Force for All Symbols. Capture the same 4 basic reports as in step 4, saving these as Run3. The expected result is that the results should be identical to Run2, however the actual results are identical to the baseline run.
9) Launch the OmniLanguage Editor, Build all Projects, close the OmniLanguage Editor.
10) Execute a fourth ToDo list run, checking Force for All Symbols. Capture the same 4 basic reports as in step 4, saving these as Run4. The observed results are now identical to Run2, reflecting the change to the parameters as overrides to the default in the OL script.

The work around here is to use the OmniLanguage editor to Build all projects prior to executing any ToDo list run. I did not test Hafnium's suggestion to conduct a Save As to create a new TP template.

You will also note that I did not delete any files between OT shutdown and startup as Vinjay did to eliminate other factors. The only delete occurred prior to and after the initial setup.

The attached zip contains all logs, OL Stop Script, Strategy, Profile, and all reports.

[Edited by jpb on 9/19/2018 12:15 PM]

Attached file : Results.zip (6619KB - 0 downloads)

^ Top
Jim Dean

Sage
20001000
Posts: 3022

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 12:43 PM
Post #45431 - In reply to #45430

Interesting

I take it that during the course of a given OT session, that sequential runs of the strat with different successive TP Stop settings do produce differing answers that make sense?

That is, can it be concluded that it’s the shutting down of OT that causes the most recent settings to revert back to default? If so, that should help N diagnose and fix the problem.

Has anyone tried, without shutting down OT, switching to a different profile &/or strategy then switching back again, to see if modified stop params are maintained?
^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 1:52 PM
Post #45432 - In reply to #45431

Jim,
Interesting questions. I made a few additional runs.

Restarted the OS and OT.

Test run 1: Immediately after OT started, I ran the strategy. The Profile was the same one as before and OT opened to it. Result: The performance report was the same as the Baseline run, meaning the override to the OL Stop defaults did not take effect.

Test run 2: Repeated the run of the strategy without restarting OT or any other change. Simply reran the strategy. Result: Matched the Baseline results as in Test run 1.

Test run 3: Switched Profiles to a different one and then immediately switched back. Result: The performance report matched the results of my original Run2. This means that the overrides to the defaults found in the Strategy's TP were now taking effect. The automated recompile with the change of Profiles must accomplish the same thing as a OL Build that recompiles all the OL scripts.

Test run 4: Immediately reran the strategy following the completion of Test run 3. Result: The performance report matched that of Test run 3.

This leads me to suspect that it is the compiling of the scripts at the start of OT that is ignoring the settings in the Strategy's TP or the timing of the compile vs the loading of all the override data. My guess.

For completeness, I also ran:

Test Run 5: Staying within the same Profile, I deactivated the strategy and selected a new strategy. I then clicked OK. Next I went back into the ToDo list and changed the strategy back to the original one, deactivating the one I had just activated. I then ran the test. Result: Same as Test Run 4. (as you would expect).

Test Run 6: Change the setting in the Strategy's Trade Plan by going into the Strategy and applying a change to the OL Stop. I then Ran the test. Result: A new result was created as seen in the performance report.

Test Run 7: Reran the strategy, forcing analysis of all symbols. Result: Same performance values as Test Run 6.

Test Run 8: Switched the profile to another profile and then back. Running the ToDo, forcing analysis for all symbols. Result: Same as Test Run 6.


[Edited by jpb on 9/19/2018 3:04 PM]

^ Top
John J

Veteran
1001002525
Posts: 272

Joined: 8/3/2010
Location: Leduc, AB

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 8:49 PM
Post #45433 - In reply to #45421

I posted some related issues involving the TP template back in June...

https://www.omnitrader.com/currentclients/otforum/thread-view.asp?threadid=15776
^ Top
Jim Dean

Sage
20001000
Posts: 3022

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/19/2018 9:13 PM
Post #45434 - In reply to #45433

But this is Different

The TP settings in a given Strategy, if I understand correctly, are reverting after the fact without user intervention.

Those settings btw are supposed to be stored in the Strategy (.OTS) file.
^ Top
Vinay

Elite
50010025
Posts: 640

Joined: 12/9/2011
Location: Planet Earth

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/20/2018 8:54 AM
Post #45435 - In reply to #45421

Thanks jpb for confirming my findings and taking it forward by doing additional tests. Although I haven't noticed any discrepancy, still it is worthwhile to test Systems Block also for any similar problem.

Barry...Have you reported this issue for fixing it at the earliest?


[Edited by Vinay on 9/20/2018 9:12 AM]

^ Top
Barry Cohen

Sage
5000100010010010025
Posts: 6338

Joined: 1/19/2004

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/20/2018 2:27 PM
Post #45436 - In reply to #45435

I reproduced & reported it. Thanks Vinay & Jeff. We'll get it fixed asap.
^ Top
Barry Cohen

Sage
5000100010010010025
Posts: 6338

Joined: 1/19/2004

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/21/2018 1:59 PM
Post #45446 - In reply to #45421

I'm told that a fix was implemented, so the next PR should have it if it passes testing.
^ Top
Jim Dean

Sage
20001000
Posts: 3022

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/21/2018 2:13 PM
Post #45447 - In reply to #45446

Great!

Can you please confirm specifically caused the problem, and that in future, all the param and other settings for a given TP instance associated with a Strategy will be saved in the OTS file?

And that the OTT trade plan file is simply an independent template, distinct from any instance of it used in a given strategy?

Thanks.
^ Top
Barry Cohen

Sage
5000100010010010025
Posts: 6338

Joined: 1/19/2004

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/21/2018 2:55 PM
Post #45448 - In reply to #45447

It had to do with the sequence of compiling when a profile is opened & only had to do with VBA specific stops. It didn't directly have anything to do with trade plans. The trade plan within the strategy is always saved in the OTS file & the OTT is still an independent template from the strategies.
^ Top
Jim Dean

Sage
20001000
Posts: 3022

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 9/21/2018 3:08 PM
Post #45449 - In reply to #45448

Thanks!
^ Top
Vinay

Elite
50010025
Posts: 640

Joined: 12/9/2011
Location: Planet Earth

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 11/25/2019 7:08 AM
Post #46482 - In reply to #45421

This issue which was fixed last year has raised its ugly head again in OT-2020. This time the problem is worse than last time. Earlier this problem occurred only after OT restart. Now it can occur anytime. It can happen after couple of analysis runs or after running database repair tool also.

Last time the problem went away if we recompiled the OmniLanguage Stop used in the Trade Plan. Now recompiling doesn't fix the problem. So if you are using any OmniLanguage Stop in a Trade Plan and change the parameters from the default values, then the analysis results may change anytime.

It appears that this issue has something to do with the changed compiling method introduced in OT-2020. Till this bug is fixed, the only way to avoid it is to use the default parameter values.

I have not checked whether this issue affects the System block also.



[Edited by Vinay on 11/25/2019 7:14 AM]

^ Top
Barry Cohen

Sage
5000100010010010025
Posts: 6338

Joined: 1/19/2004

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 11/25/2019 2:25 PM
Post #46485 - In reply to #46482

I need help to reproduce this in OT2020. I created a strategy & added a trade plan to it using the TrailingExtremeValue stop set to default parameters. I perform analysis of the profile. Then I edit that strategy's trade plan & change that stop to a different parameter & save. The analysis correctly changes as a result of the updated parameter. I then tried restarting OT, deleting the results file & VBA/Temp, & repairing the profile database. The analysis remained using the updated parameter.

Let me know what you're doing differently. If your steps are the same, please attach or email me the strategy you're testing this issue with.

^ Top
Vinay

Elite
50010025
Posts: 640

Joined: 12/9/2011
Location: Planet Earth

User Profile
 
Subject : RE: Serious Issue with OmniLanguage Stops
Posted : 11/26/2019 8:53 AM
Post #46486 - In reply to #45421

Barry,

I have sent you a mail with all details.

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.