Its good to see you are making a good effort to learn this stuff. I would take a look on the internet for some begginer C# tutorials or even a book. Some of the errors you made are programming syntax errors. Unfortunately we can not provide this level of support. I can provide a correction on part of your code below.
if (Position.MarketPosition != MarketPosition.Flat && Position.GetProfitLoss(Close[0], PerformanceUnit.Points) >= 4)
{
// Do something here
}

Comment