NexusFi: Find Your Edge


Home Menu

 





Help with this- Thanks


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 
Successlife's Avatar
 Successlife 
Any part of the world.
 
Experience: Master
Platform: Iq feed- Ensign
Trading: ES
Posts: 70 since Jul 2009
Thanks Given: 2
Thanks Received: 15

Any help with this (not work)

BarColor = Color.Yellow;




if (Close[0] > SMA(8))

BarColor = Color.Red;

if (Close[0] < SMA(8));

BarColor = Color.Green;


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Ceasefire in Name Only: Three Numbers That Define the Ir …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Q1 2026 Shatters All Derivatives Volume Records -- CME H …
Traders Hideout
Asia Equities Crash Overnight -- Nikkei -5.2%, KOSPI -6. …
Traders Hideout
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
cory's Avatar
 cory 
virginia
the coin hunter
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,093


Successlife View Post
Any help with this (not work)

BarColor = Color.Yellow;




if (Close[0] > SMA(8))

BarColor = Color.Red;

if (Close[0] < SMA(8));

BarColor = Color.Green;

Close[0] = a number
SMA(8) refers to a moving average but you need to make it into a number
SMA(8)[0] = a number


Reply With Quote
Thanked by:




Last Updated on August 23, 2018


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts