NexusFi: Find Your Edge


Home Menu

 





ContainsValue question


Discussion in Platforms and Indicators

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




 
Search this Thread

ContainsValue question

  #1 (permalink)
 solondon 
London, UK
 
Experience: Intermediate
Platform: ninja,TS,Meta,Tradeguider
Trading: FX,Metals
Posts: 38 since Sep 2011
Thanks Given: 9
Thanks Received: 6

Hi,

can anyone tell me what im doing wrong with this , in my debugging i use the following (same parameters)

" EMAflat: " + EMA_Colors(m_EmaAngle1,m_EmaAngle2,slowAverage).EMAflat[0].ToString()
+ " ContainsValue: " + EMA_Colors(m_EmaAngle1,m_EmaAngle2,slowAverage).EMAflat.ContainsValue(0).ToString()

it prints

August 02, 2013 9:24:26 OnBarUpdate() - adxSetup[0]: 1 adxEntry[0]: 1 bBuySetup: True bBuyEntry: True bSellSetup: False bSellEntry: False EMAflat: 1.3224 ContainsValue: False

I can see that the bar has a value for EMAFlat but i cant explain how both conditions can be true at the same time ie. it has a value but ContainsValue says it doesnt. is the call to the indicator plot value not treated as a dataseries or am i missing something! (too many hours today)

thanks in advance
Jlo

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


In case that

- no value has been affected to a DataSeries object for a specific bar
- or that you have reset the DataSeries for that bar

the DataSeries will still contain an object. Consider this object as a dummy or placeholder. Usually the dummy value is the close of the referenced bar.

The property "ContainsValue" holds the information, whether the object has been created by the user.

If "ContainsValue" returns the value "False", it simply means that the value stored in the DataSeries field is a dummy.


If you produce code it is your responsibility

-> to make sure that all all DataSeries fields that you want to access hold proper values
-> that you set those values in a proper way

Reply With Quote
Thanked by:
  #4 (permalink)
 solondon 
London, UK
 
Experience: Intermediate
Platform: ninja,TS,Meta,Tradeguider
Trading: FX,Metals
Posts: 38 since Sep 2011
Thanks Given: 9
Thanks Received: 6

thanks usefull information, I guess this is the hazard of using other peoples indicators

Started this thread Reply With Quote




Last Updated on August 6, 2013


© 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