Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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...
Can you help answer these questions from other members on NexusFi?
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.
Sorry, these conditions do not make sense. Let us examine
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
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.