Some languages, such as Arabic, Polish, Czech or Swahili, have reasonably-detectable stress in a rule-governed location. Russian stress is not hard to detect, but it is hard to predict where the stress is going to be. English stress is harder to predict the location of, and it is also harder to detect since secondary stress is a contrastive property. In some languages – Hindi, Georgia and Tigrinya are examples – there is substantial disagreement as to where the stress is, if indeed there is any (Hindi is sort of famous for having myriad competing and mostly irreconcilable descriptions of stress).
Unfortunately, there is no easy formula for detecting stress at the phonetic level. People usually rely on a cluster of properties that suggest "stress", for example vowels being a bit longer, or having higher pitch (perhaps lower pitch), of some subtle distinction in vowel quality. In general, if there is something that makes a particular syllable in a word "sound different", we are more likely to say that that syllable is stressed. Stress can, nevertheless, be a phonetically abstract property that doesn't directly correlate with any special phonetic property. In North Saami, there is abstract stress on every odd numbered syllable starting at the penultimate syllable of the root. This doesn't correlate with any sub-phonemic differences in vowels or consonants, but it very strongly correlates with quite a number of phonological and morphological rules that distinguish "odd" versus "even" positions. Completely orthogonal to the alternating stress of words is a pitch peak, which is root initial, and to most people indicates that the first syllable is "stressed", e.g [ˈhuteella] 'hotel'. However, the stress, not the pitch-peak, is on the penult of the root.
In order to detect "stress", you therefore have to know the phonetic and phonological rules – for North Saami, you have to know why syllable-count has an effect on the shape of affixes, and you have to know to ignore the pitch peak that seems to be where the stress is. For English, you have to know that there is both primary stress and secondary stress to take into consideration, and that aspiration, flapping, and vowels reduction are stress-sensitive – just as they are in North Saami. So just faced with a word like "latex" and comparing it to "latest", you will hopefully detect a difference in vowel quality (in latest the second vowel is schwa, in latex it is [ɛ]), perhaps duration (the first syllable of latex is longer than that of latest), and the two t's are different at least in US English – a flap in latest, aspirated in latex. We phonologically encode these patterns into a system of primary and secondary stressed, where secondary stress can be a (somewhat) contrastive property. Stress differences then trigger phonological rules, so you just have to know the rules of English that are triggered by stress properties.
However, just to complicate matters, linguists don't necessarily talk about these differences in terms of stress, instead you will find discussions based on differences in foot structure or syllable structure – for instance, flapping is often said to apply in "foot-medial position". This is an analytic consideration, that perhaps it is better to not include a feature "stress" in the inventory of phonological objects. It may therefore be necessary to also look at how "stress" (or "accent") is treated theoretically, in order to make sense of the English (or other language) generalizations that reveal stress.
It would be unwise for us to try to guess why you pronounce English words the way you do, without a deeper study of your actual pronunciation. Maybe stress is responsible for the perceived length pattern, but maybe it is vowel quality (ɑ is an intrinsically longer vowel, schwa is an intrinsically short vowel).