Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
multiseries stochastics
Collapse
X
-
multiseries stochastics
How to set up a if condition-> enterLong, in case stochastic D crossesAbove K below 20 level? and respectivelly to enterShort in case stochastic D crossBelow K above 80 level? Both considering instrument [1] it is a Multi series strategy..Tags: None
-
Hi dafonseca,
I'm not quite sure what this means.
Do you want a condition that says if the stochastics D line crosses above the stochastics K line and both are above 20?
Or just the K line is above 20?Code:if (CrossAbove(Stochastics(BarsArray[0], 7, 14, 3).D, Stochastics(BarsArray[0], 7, 14, 3).K, 1) && Stochastics(BarsArray[0], 7, 14, 3).D > 20 && Stochastics(BarsArray[0], 7, 14, 3).K > 20)
Or just the D line is above 20?Code:if (CrossAbove(Stochastics(BarsArray[0], 7, 14, 3).D, Stochastics(BarsArray[0], 7, 14, 3).K, 1) && Stochastics(BarsArray[0], 7, 14, 3).K > 20)
Are you wanting to use the primary data series or the secondary dataseries? Currently, the examples above use the primary data series.Code:if (CrossAbove(Stochastics(BarsArray[0], 7, 14, 3).D, Stochastics(BarsArray[0], 7, 14, 3).K, 1) && Stochastics(BarsArray[0], 7, 14, 3).D > 20)
Chelsea B.NinjaTrader Customer Service
-
Comment
-
Hi dafonseca,
Sorry about that. I was changing things around and copied the wrong line.
The bars ago value is missing from the stochastic k and d lines being over 20.
Corrected it looks like:
When you mention "when using stochastics, one must act only on botton and top.. below and above 20 and 80 lines" I'm not quite sure what you mean by this. Are you saying the K line must be above and below 80? Does this mean that the K line must be above 20 to enter long and below 80 to enter short?Code:if (CrossAbove(Stochastics(BarsArray[0], 7, 14, 3).D, Stochastics(BarsArray[0], 7, 14, 3).K, 1) && Stochastics(BarsArray[0], 7, 14, 3).D[B][0][/B] > 20 && Stochastics(BarsArray[0], 7, 14, 3).K[B][0][/B] > 20)
Can you clarify this for me?Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
639 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
366 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
572 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment