Jump to content
Medved Trader Forums

C# Error


Recommended Posts

C# Noob Error - I've tried adding semicolons and searched examples trying to figure this basic error out for an hour,  but can't figure out how to clear the two CS1002 errors.

Need an experienced eye that sees what I am missing ... maybe a suggestion of a resource to study to get up to speed.

Thank You!

B

 

 Cerror.jpg.a0b48741619fcec5ef8c7fc0b85e5707.jpg

Link to comment
Share on other sites

public void MainCalculation()
{
    If (HMA_Line[1]>HMA_Line)
    {
        SetColorAndShape(SysColor.MainIndicator3, PBShape.ArrowDn);
        TriggerAlert("HMA10Down", @"HMA10Down");
        return;
    }
    else if (HMA_Line[1]<HMA_Line)
    {
        SetColorAndShape(SysColor.MainIndicator2, PBShape.ArrowUp);
        TriggerAlert("HMA10Up", @"HMA10Up");
        return;
    }
}
Edited by bcavender
Link to comment
Share on other sites

I knew C# was case sensitive, but my reading had seen stuff like this that used upper case "If" ... but use lower case in real code.

Knew this had to be something simple.  The semicolon error was a pretty good distraction ... 

Thank you for your good help ... I would have wasted a lot more time on this nuance without your assist.

Best regards,

B

Cif.JPG.a73aa3e0eca60d848839c573524b376b.JPG

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...