NexusFi: Find Your Edge


Home Menu

 





Indicator programming


Discussion in NinjaTrader

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




 
Search this Thread

Indicator programming

  #1 (permalink)
Mondrakete
Germany
 
Posts: 24 since Feb 2011
Thanks Given: 1
Thanks Received: 0

Hi there,
I recently observed a problem related to calculation of indicators by values of another indicator.
For illustration see the following example:

indi1:

if (CurrentBar>=200)
{
Plot0.Set(1);
}
else
{return;}

Applied to a chart the indicator plots nothing before bar no. 200, after it it plots 1.

indi2:

Plot0.Set(Testindi1()[0]);

I would expect and want indi2 to do the same as indi1, which means to plot and calculate nothing befor bar number 200.
What happens instead is that the value of the current Close is plotted befor bar number 200.

Any suggestions how to get rid of/suppress that behaviour?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
Strategy stop orders partially filled
EasyLanguage Programming
Better Renko Gaps
The Elite Circle
What broker to use for trading palladium futures
Commodities
 
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
  #3 (permalink)
 bukkan 
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
Posts: 278 since Jun 2009
Thanks Given: 161
Thanks Received: 271


i suppose u do a checking like

 
Code
if (Testindi1().Value.IsValidPlot(CurrentBar))
{
//do your stuff
}

Reply With Quote
Thanked by:
  #4 (permalink)
Mondrakete
Germany
 
Posts: 24 since Feb 2011
Thanks Given: 1
Thanks Received: 0

-Thanks, with that checking it works.

Reply With Quote




Last Updated on April 3, 2011


© 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