![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jan 2008
Posts: 29
Thanks: 0
Thanked 0 times in 0 posts
|
// Condition set 1
if (High[0] > High[1] + 5 * TickSize) { EnterLong(DefaultQuantity, "long HA"); it will not compile the above conditions any reason or how can write if HeikenAshi turns red which is down bar go short and turns green which is up go long Thanks |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
You are missing a curly brace at the end. Should be:
// Condition set 1 if (High[0] > High[1] + 5 * TickSize) { EnterLong(DefaultQuantity, "long HA"); }
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
|
Hello, anyone have found a way to know if HeikenAshi bar is red or green? Please share it. Thanks in advance.
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,858
Thanks: 162
Thanked 579 times in 570 posts
|
Hello luxurious_04,
Thank you for your post. You would need to replicate the conditions from the HeikenAshi indicator source code for when this condition is true. You can view the source code for this indicator by going to Tools--> Edit NinjaScript--> HeikenAshi. From there, you should be able to find the conditions that are met when a bar is red or green.
Matthew
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Heikenashi | nelson | Charting | 6 | 08-03-2007 12:59 PM |