Compile error : Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement
Author: leeto
Creation Date: 6/23/2015 10:04 AM
profile picture

leeto

#1
Let say I would like to enter in a stock if at the moment of 10:50AM cumulative volume were bigger than 200K.

I wrote the code but it doesn't compile because of this line :

CODE:
Please log in to see this code.


The formulation of the error is that
QUOTE:
Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement


How should I change my code to get rid of this error. Please help. Many thanks in advance !

CODE:
Please log in to see this code.
profile picture

Cone

#2
CODE:
Please log in to see this code.
profile picture

leeto

#3
Many thanks for your help Cone. Indeed in this way code will be work. However, this is my fault that I didn't precisely explain what try to accomplish. So I intend to make some kind of time - volume checker to avoid aka "sleeping giants" .

For instance,

if time 11AM, volume should be more than 300k
if time 12AM, vol should be more than 400k
if time 13AM, vol should be more than 500k
if time 14AM, vol should be more than 600k
if time 15AM, vol should be more than 700k
...
and here I write my another entries conditions.
So this scheme allow me to enter in any time of the day but only in stocks that have decent volume and active all day long.


But the code that you provide
CODE:
Please log in to see this code.

didn't allow me to enter in any time of the day but only in 1050AM. Anyway thanks for help and sorry that I didn't clarify my intentions.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).