put main function in while loop and moved global var for avgLine to main so we can store patterns and check them like data feed is live. created manual break for testing.