protected override void OnBarUpdate()
{
// Condition set 1
if (EMA(9)[1] < EMA(18)[1]
&& Close[1] > Open[1]
&& Low[0] < Low[1])
{
EnterShort(DefaultQuantity, "Short1");
}
}
Line 49 is the sixth line down, the second beginning with double ampersands. Here are the error messages:
NinjaScript File | Error | Code | Line | Column |
Strategy\TutorialSMA.cs | Invalid expression term '&&' | CS1525 - click for info | 49 | 53 |
Strategy\TutorialSMA.cs | ; expected | CS1002 - click for info | 49 | 56 |
Strategy\TutorialSMA.cs | ; expected | CS1002 - click for info | 49 | 79 |
Strategy\TutorialSMA.cs | Invalid expression term ')' | CS1525 - click for info | 49 | 79 |
Strategy\TutorialSMA.cs | ; expected | CS1002 - click for info | 49 | 81 |
Strategy\TutorialSMA.cs | Invalid expression term ')' | CS1525 - click for info | 49 | 81 |
Strategy\TutorialSMA.cs | ; expected | CS1002 - click for info | 49 | 82 |
Comment