Idea - futures io
futures io futures trading



Idea


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Kush with 3 posts (0 thanks)
    2. looks_two Fat Tails with 2 posts (2 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 indiantrader with 1 posts (0 thanks)
    1. trending_up 2,358 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 6 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
 

Idea

(login for full post details)
  #1 (permalink)
San Sebastian/Spain
 
 
Posts: 12 since Sep 2011
Thanks: 0 given, 1 received

Hi, I have found this idea at Jeffrey Katz Book but I don't get it at all. Can anyone help me to programm this?
If a new 50-day high has occurred within the last 10 days, then Buy. If a new 50-day low has occurred within the last 10 days, then Sell.


// Condition set 1
if (MAX(High, 50)[0] > MAX(High, 10)[0])
{
EnterLong(DefaultQuantity, "");
}

// Condition set 2
if (MIN(Low, 50)[0] < MIN(Low, 10)[0])
{
EnterShort(DefaultQuantity, "");
}

I'm not sure if it's like this.... some help...

Reply With Quote

Can you help answer these questions
from other members on futures io?
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
MACD line not plotting after change of plot order
NinjaTrader
OFA (Order Flow Analytics) Licence
NinjaTrader
ZigZag with Depth and Backstep
EasyLanguage Programming
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
 
 
(login for full post details)
  #3 (permalink)
Mumbai, India
 
Experience: Intermediate
Platform: MT4, NT7,eSignal
Broker: AMP/CQG
Trading: Index,currencies
 
indiantrader's Avatar
 
Posts: 115 since Jul 2010
Thanks: 323 given, 150 received



Kush View Post
Hi, I have found this idea at Jeffrey Katz Book but I don't get it at all. Can anyone help me to programm this?
If a new 50-day high has occurred within the last 10 days, then Buy. If a new 50-day low has occurred within the last 10 days, then Sell.


// Condition set 1
if (MAX(High, 50)[0] > MAX(High, 10)[0])
{
EnterLong(DefaultQuantity, "");
}

// Condition set 2
if (MIN(Low, 50)[0] < MIN(Low, 10)[0])
{
EnterShort(DefaultQuantity, "");
}

I'm not sure if it's like this.... some help...


I guess you can use 50 period SMA applied to the high of bars. Now when close of current bar crosses above this 50 period SMA for highs with look back period of 10 it will meet the condition.

// Condition set 1
if (CrossAbove(Close, SMA(High, 50), 10))
{
EnterLong(DefaultQuantity,
"");
}
// Condition set 2
if (CrossBelow(Close, SMA(Low, 50), 10))
{
EnterShort(DefaultQuantity,
"");
}

You can use the wizard to enter these conditions. Use input series as high or low of price bars.

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


Kush View Post
Hi, I have found this idea at Jeffrey Katz Book but I don't get it at all. Can anyone help me to programm this?
If a new 50-day high has occurred within the last 10 days, then Buy. If a new 50-day low has occurred within the last 10 days, then Sell.


// Condition set 1
if (MAX(High, 50)[0] > MAX(High, 10)[0])
{
EnterLong(DefaultQuantity, "");
}

// Condition set 2
if (MIN(Low, 50)[0] < MIN(Low, 10)[0])
{
EnterShort(DefaultQuantity, "");
}

I'm not sure if it's like this.... some help...


Sorry, these conditions do not make sense. Let us examine

 
Code
if (MAX(High, 50)[0] > MAX(High, 10)[0])
This means that the high of the last 50 bars was higher than the high at the last 10 bars. This is the case if after a new high you observe 10 bars with a lower high. This really does not make sense as a condition to enter long. Also, it would be enough to write

 
Code
if (MAX(High, 11)[0] > MAX(High, 10)[0])
to trigger that same entry. The first condition will just trigger additional entries with each following bar that closes below the swing high.

I am sure that Jeffrey Katz did not specify any such condition. Best you point us directly to the source of your wisdom, so that we can find out, what he really meant.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
San Sebastian/Spain
 
 
Posts: 12 since Sep 2011
Thanks: 0 given, 1 received

It is explain in the page of 261 of the book The Encyclopedia of Trading Strategies:

If a new 50-day high has ocurred within the last 10 days, then True, else False. Instead True, it can be Buy

I don't know how can I programm this????

Reply With Quote
 
(login for full post details)
  #6 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received


Kush View Post
It is explain in the page of 261 of the book The Encyclopedia of Trading Strategies:

If a new 50-day high has ocurred within the last 10 days, then True, else False. Instead True, it can be Buy

I don't know how can I programm this????

Katz/McCormick used that condition for one of the rules for a genetic optimizer. It is not an entry condition but a trendfilter.

The code in NinjaTrader would look like this:

 
Code
private bool rule_6 = false;
for (int i=0; i < 10;  i++)
{
     if ( High[i]  ==  MAX(High, 50)[i]
              rule_6 = true;
}

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #7 (permalink)
San Sebastian/Spain
 
 
Posts: 12 since Sep 2011
Thanks: 0 given, 1 received

Thank you for the explanation! Yes I found it in the chapter about Genetic Algorithms.


Thank you.

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Idea


Last Updated on September 12, 2011


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