Can somebody explain what this code is doing in English please? - NinjaTrader | futures io social day trading
futures io futures trading


Can somebody explain what this code is doing in English please?
Updated: Views / Replies:133 / 1
Created: by olobay Attachments:0

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
 
Thread Tools Search this Thread
 

Can somebody explain what this code is doing in English please?

  #1 (permalink)
Elite Member
Montreal
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: IB Canada/IQFeed
Favorite Futures: TF, CL
 
Posts: 260 since Jul 2011
Thanks: 288 given, 330 received

Can somebody explain what this code is doing in English please?

Hi,

Can somebody explain what this NinjaTrader code is doing in English please? I would like to convert it to Easylanguage. Thanks.

 
Code
if (base.CurrentBar >= 20)
            {
                double num = 0.0;
                for (int i = 0; i < 5; i++)
                {
                    num += base.Momentum(1)[i];
                }
                double num3 = 0.0;
                for (int j = 0; j < 5; j++)
                {
                    num3 += Math.Abs(base.Momentum(1)[j]);

Reply With Quote
 
  #2 (permalink)
Elite Member
Los Angeles CA
 
Futures Experience: Beginner
Platform: NT8
Favorite Futures: NQ YM ES ZN CL GC HG ZS 6E 6A 6J 6C
 
FlyingMonkey's Avatar
 
Posts: 470 since Jan 2016
Thanks: 1,813 given, 1,361 received


olobay View Post
Hi,

Can somebody explain what this NinjaTrader code is doing in English please? I would like to convert it to Easylanguage. Thanks.

 
Code
if (base.CurrentBar >= 20)
            {
                double num = 0.0;
                for (int i = 0; i < 5; i++)
                {
                    num += base.Momentum(1)[i];
                }
                double num3 = 0.0;
                for (int j = 0; j < 5; j++)
                {
                    num3 += Math.Abs(base.Momentum(1)[j]);

This is calling the base Momentum indicator so you need to look at that also.

https://ninjatrader.com/support/helpGuides/nt8/en-us/?momentum.htm

Without lookin at that indicator, my assumption is basically this code appears to be getting two sums.

1. Over the last 5 bars, sum of the difference in closes from bar to bar. This could be a positive or negative number depending on whether the net change is up or down.

2. Over the last 5 bars, sum of the absolute value of those same differences. This can only be a positive number.

So it appears to be comparing 5 bar directional movement (1) with 5 bar amount of price fluctuation in either direction(2)

Reply With Quote
The following user says Thank You to FlyingMonkey for this post:

Reply



futures io > > > > Can somebody explain what this code is doing in English please?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Opening Breakouts and Reversals w/Al Brooks

Elite only
 

Introducing daytradr by Jigsaw, new stand-alone platform

Oct 19
 

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
All other non-English languages subforum Big Mike All Other non-English Languages 0 July 1st, 2012 10:25 PM
Need English translation GridKing News and Current Events 0 February 8th, 2012 04:47 AM
NO SPEAKAH DE ENGLISH redratsal Jokes 0 June 8th, 2011 05:55 AM
New trading forums for non-English traders Big Mike Feedback and Announcements 11 December 17th, 2010 08:07 PM
On speaking English correctly... trendisyourfriend Off-Topic 15 December 6th, 2010 01:55 PM


All times are GMT -4. The time now is 06:24 PM.

Copyright © 2017 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 2017-10-17 in 0.06 seconds with 18 queries on phoenix via your IP 54.81.178.153