Cycle progression? - futures io
futures io futures trading



Cycle progression?


Discussion in NinjaTrader

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




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Cycle progression?

(login for full post details)
  #1 (permalink)
Pitea, BD, Sweden
 
Experience: Beginner
Platform: Ninjatrader
Trading: ES
 
Posts: 34 since Nov 2011
Thanks: 1 given, 4 received

Is there anyone who can code this Metastock formula to Ninja Trader?

Sum(If(C>Ref(C,-1),1,0),5)<Sum(If(C<Ref(C,-1),1,0),5)

Sum(If(C>Ref(C,-1),1,0),5)>Sum(If(C<Ref(C,-1),1,0),5)


Someone explained:

1. If(C>Ref(C,-1),1,0) - If current close is greater than previous close then 1 else zero.
2. Sum of 1 for last 5 periods (i.e. sum of either 1 or 0 from point 1 result)
3. If(C<Ref(C,-1),1,0) - If current close is less than previous close then 1 else zero
4. Sum of 3 for last 5 periods (i.e. sum of either 1 or 0 from point 3 result)
Then
check if 2 < 4 or 2 > 4

Thanks

Started this thread Reply With Quote

 
Best Threads (Most Thanked)
in the last 7 days on futures io
Battlestations: Show us your trading desks!
111 thanks
Selling Options on Futures?
109 thanks
Rank your Futures vs Stocks trading priority
37 thanks
Want your NinjaTrader indicator created, free?
26 thanks
Bitcoin storage wallet recommendations
18 thanks
 
(login for full post details)
  #3 (permalink)
Erfurt Germany
 
Experience: Master
Platform: rtMagic, NinjaTrader
Broker: AMP/CQG, IAB
Trading: ES, 6E, FDAX, FGBL
 
Posts: 338 since Aug 2011
Thanks: 54 given, 461 received



Leo123 View Post
Is there anyone who can code this Metastock formula to Ninja Trader?

Sum(If(C>Ref(C,-1),1,0),5)<Sum(If(C<Ref(C,-1),1,0),5)

Sum(If(C>Ref(C,-1),1,0),5)>Sum(If(C<Ref(C,-1),1,0),5)


Someone explained:

1. If(C>Ref(C,-1),1,0) - If current close is greater than previous close then 1 else zero.
2. Sum of 1 for last 5 periods (i.e. sum of either 1 or 0 from point 1 result)
3. If(C<Ref(C,-1),1,0) - If current close is less than previous close then 1 else zero
4. Sum of 3 for last 5 periods (i.e. sum of either 1 or 0 from point 3 result)
Then
check if 2 < 4 or 2 > 4

Thanks


QUICK&DIRTY... (only write as text, no 100% syntax checked )

variables:
DataSeries dsCmpLower;
DataSeries dsCmpHigher;

initialization:
dsCmpLower=new DataSeries(this);
dsCmpHigher=new DataSeries(this);


onbarupdate:

if(CurrentBar>0)
{
dsCmpLower.Set(Close[0]<Close[1] ? 1:0);
dsCmpHigher.Set(Close[0]>Close[1] ? 1:0);
}
else
{
dsCmpLower.Set(0);
dsCmpHigher.Set(0);
}

if(CurrentBar>5)
{
if(SUM(dsCmpLower,5)[0] > SUM(dsCmpHigher,5)[0])
{
// ...code...
}
}

Reply With Quote
The following user says Thank You to TimeTrade for this post:
 
(login for full post details)
  #4 (permalink)
Pitea, BD, Sweden
 
Experience: Beginner
Platform: Ninjatrader
Trading: ES
 
Posts: 34 since Nov 2011
Thanks: 1 given, 4 received


TimeTrade View Post
QUICK&DIRTY... (only write as text, no 100% syntax checked )

variables:
DataSeries dsCmpLower;
DataSeries dsCmpHigher;

initialization:
dsCmpLower=new DataSeries(this);
dsCmpHigher=new DataSeries(this);


onbarupdate:

if(CurrentBar>0)
{
dsCmpLower.Set(Close[0]<Close[1] ? 1:0);
dsCmpHigher.Set(Close[0]>Close[1] ? 1:0);
}
else
{
dsCmpLower.Set(0);
dsCmpHigher.Set(0);
}

if(CurrentBar>5)
{
if(SUM(dsCmpLower,5)[0] > SUM(dsCmpHigher,5)[0])
{
// ...code...
}
}


Thanks you are fast!

But, there are some data errors...

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Cycle progression?


Last Updated on February 28, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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