NexusFi: Find Your Edge


Home Menu

 





Different results single TF vs muti TF using Gom-based indicator


Discussion in NinjaTrader

Updated
    1. trending_up 917 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

Different results single TF vs muti TF using Gom-based indicator

  #1 (permalink)
 Silverm3170 
Irvine + CA/USA
 
Experience: Intermediate
Platform: Sierra Chart, NinjaTrader
Trading: ES, ZB, CL
Posts: 4 since Dec 2014
Thanks Given: 6
Thanks Received: 1

Hello,

I'm trying to write a NT7 indicator that uses Gomi non-cumulative delta for multiple time frames. I'm getting a discrepancy in the results of the second time frame when it's added as a second bar series than when it's standalone as the primary time frame. e.g. in single time frame case, the bar type is an ES 10-tick range bar, and in the multi-time frame the primary bar is an ES 5-tick range bar and the second is ES 10-tick range. The discrepancy appears to be when the FirstTickOfBar event is issued. Here are some details from logging to illustrate. I'm just referencing the first couple of update events:

Single bar case:
- First GomOnBarUpdate::FirstTickOfBar before any GomOnMarketData
- Second GomOnBarUpdate::FirstTickOfBar at 8/2/2017 3:26:18AM : cumulative delta -1393 after 27843 iterations of GomOnMarketData

Multi bar case:
- First GomOnBarUpdate::FirstTickOfBar for BarsInProgress = 1 after 11 BarsInProgress = 0
- Timestamp is the same, 8/2/2017 3:26:18AM.
- Cumulative delta is -1649 after 27481 iterations of GomOnMarketData. This is the same value as the single bar case at its iteration 27481. But single bar didn't trigger the FirstTickOfBar update until after iteration 27843, by which the delta had become -1393.

I reset the delta in response to FirstTickOfBar after first saving the current accumulated value, so the -1649 would be considered the close of the previous bar. As a sanity test, by iteration 27843 of the multi-bar case, the delta post-reset, i.e. accumulating for the the next bar, is 256. So had it not reset, the delta at that point would have been -1649 + 256 = -1393. This is the same value as the single bar case at that iteration. So the data accumulation is not the issue. It's the syncing of when the FirstTickOfBar events are arriving. For the single bar case it's after 27843 iterations of onMarketData, for the multi-bar case it's after 27481 iterations, and yet both have the same timestamps. Due to this mismatch cuttoffs where the closing delta results are committed are different.

This behavior is the same regardless of the CalculateOnBarClose setting.

An additional note, I've modified the GomRecorderIndicator to allow calling GomOnUpdateDone for all BarsInProgress during this development, as it currently only calls it for BarsInProgress 0. However currently I'm committing the closing values during GomOnUpdate, so I don't think that change should have any bearing. But I haven't looked into this yet.

I posted this question at the Ninjatrader forum but the response I got was that this is a vendor-specific issue since it's based on the Gom framework. I'm hoping someone here might have some insight into this problem.

Is there any way to force the FirstTickOfBar for the second bar series to behave the same as the standalone single bar case?

Alternatively, is there a way to access indicator data from another chart? TradeThePlan.com for instance has an indicator reader, so I'm assuming this should be doable. However i don't know what kind of back door hacking that might have involved.

Thanks for any help,
silverm3170

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Quantum physics & Trading dynamics
The Elite Circle
What broker to use for trading palladium futures
Commodities
Strategy stop orders partially filled
EasyLanguage Programming
Cheap historycal L1 data for stocks
Stocks and ETFs
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
22 thanks
Funded Trader platforms
17 thanks
ApexTraderFunding.com experience and review
13 thanks
Trading with Intuition
12 thanks
GFIs1 1 DAX trade per day journal
9 thanks




Last Updated on August 4, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts