![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jul 2009
Posts: 43
Thanks: 0
Thanked 0 times in 0 posts
|
How do I write if statements in Ninja that = true else false? Also after I write a number of true false conditions how do I compile them into one statement?
Ex: if Condition one = true and condition two = true and condition three = true then plot..... If you have a good example and I can see the code this would greatly be appreciated. |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Code:
if (condition1 && condition2 && condition3)
{
// do something;
}
else
{
// do something else;
}
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jul 2009
Posts: 43
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks Josh,
Found it under Control statements, The learning continues.... |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strategy.CalculateOnBarClose=true vs. Indicator.CalculateOnBarClose=false | karimatka | Strategy Development | 7 | 05-23-2011 03:39 AM |
| Live Print statements | jerimac2 | Automated Trading | 2 | 09-29-2009 10:42 AM |
| IF Statements | bologc | NinjaScript File Sharing Discussion | 3 | 09-03-2009 08:48 AM |
| Simulation, true or false? | RVRoman | General Programming | 1 | 09-02-2008 02:34 AM |
| statements ignored | Burga1 | General Programming | 8 | 06-30-2008 10:36 PM |