Stochastics coding help needed! - NinjaTrader Programming | futures io social day trading
futures io futures trading


Stochastics coding help needed!
Updated: Views / Replies:7,228 / 33
Created: by RodS Attachments:12

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 12  
 
Thread Tools Search this Thread
 

Stochastics coding help needed!

  #31 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,360 given, 383 received

Roonius,

thanks for coding this... I'm learning all the time and wonder how to read this portion of your code "in layman's terms"

 
Code

Plots[0].Min = Lines[0].Value;
Plots[0].Max = Lines[1].Value;
Plots[2].Min = Lines[1].Value;
Plots[3].Max = Lines[0].Value;
I understand the Plots[] part but not the ".Min or .Max" or the "Lines[].Value" with the 0 or 1. My methods have taught me I'd have to do something like this:
 
Code
if (D[0] > Upper)
{
Values[2].Set(D[0]);
}
I'd like to continue learning advance coding techniques whenever I see them.
I appreciate your explanation
thanks in advance.
Kirk

Reply With Quote
 
  #32 (permalink)
 Vendor: www.tradingstudies.com 
Denver, CO
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: TF, ES, CL
 
roonius's Avatar
 
Posts: 132 since Jun 2009
Thanks: 20 given, 273 received


zeller4 View Post
Roonius,

thanks for coding this... I'm learning all the time and wonder how to read this portion of your code "in layman's terms"

 
Code

Plots[0].Min = Lines[0].Value;
Plots[0].Max = Lines[1].Value;
Plots[2].Min = Lines[1].Value;
Plots[3].Max = Lines[0].Value;
I understand the Plots[] part but not the ".Min or .Max" or the "Lines[].Value" with the 0 or 1. My methods have taught me I'd have to do something like this:
 
Code
if (D[0] > Upper)
{
Values[2].Set(D[0]);
}
I'd like to continue learning advance coding techniques whenever I see them.
I appreciate your explanation
thanks in advance.
Kirk

Lines[0] and Lines [0] are the values of the lines you set for overbought oversold areas.

Values[0] correspond to Plots[0]
Values[1] correspond to Plots[1] etc.

Values[] hold actual double values and Plots[] hold plotting properties.

Plots[0].Max = 100 means "Plot Value[0] on the chart if Value[0] is less than 100 otherwise do no plot"

Reply With Quote
The following 3 users say Thank You to roonius for this post:
 
  #33 (permalink)
Elite Member
Florida
 
Futures Experience: Intermediate
Platform: NT7
Favorite Futures: CL, NQ, NG
 
Posts: 456 since Jun 2009
Thanks: 1,360 given, 383 received


Thanks Roonius for the explanation.
As I took another look, I noticed the properties section doesn't have code for the Values[2] and [3] as it is for [0] and [1].
 
Code

[Browsable(false)]
[XmlIgnore()]
public DataSeries D
{
get { return Values[0]; }
}
Please tell me why you don't need those there? or why you might decide either way if it's needed or not.
thanks,
kz
Learning All the Time!

Reply With Quote
 
  #34 (permalink)
 Vendor: www.tradingstudies.com 
Denver, CO
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: TF, ES, CL
 
roonius's Avatar
 
Posts: 132 since Jun 2009
Thanks: 20 given, 273 received


zeller4 View Post
Thanks Roonius for the explanation.
As I took another look, I noticed the properties section doesn't have code for the Values[2] and [3] as it is for [0] and [1].
 
Code

[Browsable(false)]
[XmlIgnore()]
public DataSeries D
{
get { return Values[0]; }
}
Please tell me why you don't need those there? or why you might decide either way if it's needed or not.
thanks,
kz
Learning All the Time!

Properties are needed for accessing internal fields -either for setting values or getting values.

In this case:

Values[0] = D
Values[1] = K
Values[2] = D
Values[3] = D

We don't need 3 properties to access the same value.
Values[2] and Values[3] are added just for visualization (color change).

Actually we don't even need the existing properties:

public DataSeries D
{
get { return Values[0]; }
}

What is actually going here is - when we are accessing one property (D), it will pass us a value of another property (Values[0])

It is just for easier understandability for the end user.

Stochastics(3,5,2).D is easier to understand than

Stochastics(3,5,2).Values[0]

Reply With Quote
The following 2 users say Thank You to roonius for this post:

Reply



futures io > > > > > Stochastics coding help needed!

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

Wyckoff Hunting for Great Risk/Reward Ratio w/Gary Fullett

Elite only
 

Digging into the Details of iSystems w/Stage 5 & iSystems

Jun 5
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stochastics min/max Prediction within range bar gain247 NinjaTrader 24 August 6th, 2011 11:51 PM
Stochastics Cross Indicator DennisA NinjaTrader 1 March 30th, 2011 06:30 PM
Stochastics Crossover Alert Indicator -> coding- WORKSHOP engl98 The Elite Circle 40 January 20th, 2011 09:32 PM
Strategy Coding - help needed - ORB & Trailing conditions RodS The Elite Circle 24 December 8th, 2010 08:30 AM
compare stochastics on different charting software traderTX NinjaTrader Programming 18 April 20th, 2010 09:13 PM


All times are GMT -4. The time now is 01:25 PM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2018-05-23 in 0.10 seconds with 20 queries on phoenix via your IP 54.162.253.34