You would also need to use the indicator from OnBarUpdate to have it calculate, your sample is not currently using the indicator in any way besides adding it to the chart. If you uncomment the condition you had added then it should appear visually however you are using it like it has plots which it does not. That will cause an error because you have no plots but you try to access data.
You could instead use
SecondEntryV21.Update();
Please let me know if I may be of further assistance.
Comment