Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
EMA on the Indicator
Collapse
X
-
Hello back to you sr. I am a software engineer, I am just looking for support from the creators of ninjascript, thank you Sir.
If you want to "HELP" please answer here. this is a community; I have nothing against selling services. but be clear with your intentions. HELP implies, no cost.
My question is very simple and straight forward, If you know ninjatrader framework you would quickly answer thisLast edited by amfpaulo; 06-29-2024, 08:29 PM.
Comment
-
Please post a pseudo code/algo , also method from the framework I should use. Live CrossBelow/Above. You just made you something from thin air... Elaborate on your solution, if it was simple I was not going to be here asking this question. Can you add more details to your words?
Comment
-
Man, It's not about Logic, I have the logic, Its about what the framework offers. Please do not waste people time. specially madding up stuff from thin air, I was being polite and open mind about the stupid think you wrote: "with X bars lookback and you check if above EMA(Period)"... DO NOT WASTE PEOPLE TIME. Let Ninja Trader support people answer. Do not try sell things you have no idea. Go try scam people someplace else.
Comment
-
Check this link there is more information language and method of use of NinjaTrader Platform Trading Software on this : https://ninjatrader.com/support/help...rslookback.htm
Comment
-
Hello amfpaulo,
I recommend you use the CountIf() method to return if the condition is true for specified number of bars.
For example:
private int barsBack = 5;
if (CountIf(() => Close[0] > SMA(14)[0], barsBack) > barsBack)
{
Print("the close was greater than the sma for the last " + barsBack + " bars");
}
Below is a link to the help guide.
You could also use a for loop (which is what the CountIf() method is doing internally).
For example:
private int barsBack = 5;
In OnBarUpdate():
bool allBarsGreater = true;
for (int index = 0; index < barsBack; index++)
{
if (Low[index] > SMA(14)[index])
{
allBarsGreater = false;
}
}
if (allBarsGreater == true)
{
Print("the close was greater than the sma for the last " + barsBack + " bars");
}
Below are links to educational material on for loops.
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
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
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment