Jason Posted July 23, 2019 Report Posted July 23, 2019 Why does this work: (Close <= EMA_10+.05 && Close > EMA_10-.05) && (EMA_10 >= VWAP_U) && (Open[3] >= Close) && (High[3] >= High) ) but then this fails: (Close.Crosses(EMA_10) | Close.Crosses(EMA_20)) && (EMA_10 >= VWAP_U) && (Open[3] >= Close) && (High[3] >= High) ) with the error codes: 25, 102 CS0019 Operator '>=' cannot be applied to operands of type 'MT.Charting.PaintbarBase.IndexedPropertyDouble' and 'MT.Charting.PaintbarBase.IndexedPropertyDouble' 25, 124 CS0019 Operator '>=' cannot be applied to operands of type 'double' and 'MT.Charting.PaintbarBase.IndexedPropertyDouble' 25, 146 CS0019 Operator '>=' cannot be applied to operands of type 'double' and 'MT.Charting.PaintbarBase.IndexedPropertyDouble' The EMA, Open[3] and High[3] elements are highlighted but none of that code was changed. Thanks Quote
Jerry Medved Posted July 23, 2019 Report Posted July 23, 2019 we are fixing this. Meanwhile, if you change it to(Close.Crosses(EMA_10[0]) || Close.Crosses(EMA_20[0])) && (EMA_10[0] >= VWAP_U[0]) && (Open[3] >= Close[0]) && (High[3] >= High[0]) ) it will work NOTE: | is a bitwise OR where as || is a logical OR. Need to use || or MT supports the word OR Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.