NexusFi: Find Your Edge


Home Menu

 





Parallel Close Slopes


Discussion in NinjaTrader

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




 
Search this Thread

Parallel Close Slopes

  #1 (permalink)
stockgoblin
Canaduh
 
Posts: 22 since Aug 2011
Thanks Given: 3
Thanks Received: 3

Hi,

I'm just learning to put together some Ninjatrader Indicators and I'm experimenting with the following:

I'm trying to have an indicator identify the difference between Close[0] & Close[1] (Slope), find all equal instances of that Slope and Draw Lines where there are parallell slopes.

I guess I have to use a FOR loop and a DataSeries:

My first attempt looks like this:

 
Code
protected override void OnBarUpdate()
{

myDataSeries.Set(Math.Abs(Close[0] - Close[1]));

int i;

for (i = 0; i < 256; ++i)
{

if ((Close[0] - Close[1]) == myDataSeries[i])
{
DrawExtendedLine("Slope" + Time, false, 1, Close[1], 0, Close[0], Color.Green, DashStyle.Dash, 2);	

}
}

Shouldn't that do something or am I missing a concept as nothing appears and I'm using SVLC Weekly Data which contains 2 sets of parallell slopes.

Close[0] - Close [1] = .11
Close[1] - Close [2] = .11

Close[7] - Close [8] = .08
Close[12] - Close [13] = .08


Thanks for any help.

Reply With Quote




Last Updated on March 24, 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