trojancd
10-04-2008, 04:31 PM
I don't think I know how to do the forum query the correct way, I've been trying to search the forums for this particular chunk of code, i'm sure its been written before...but I can't seem to find anything on it.
I need to add a strategy to my system which does the following, here's my psuedo code:
value1 = get close price of xx:39 pm
value2 = get closing price of xx:42 pm
result1 = value2 - value1
if result1 >= 50
go long on close
if result <= -50
go short on close
else if
do nothing
=========
If someone can point me in the right direction, or show me an elegant solution, i'd really appreciate it.
Chris
I need to add a strategy to my system which does the following, here's my psuedo code:
value1 = get close price of xx:39 pm
value2 = get closing price of xx:42 pm
result1 = value2 - value1
if result1 >= 50
go long on close
if result <= -50
go short on close
else if
do nothing
=========
If someone can point me in the right direction, or show me an elegant solution, i'd really appreciate it.
Chris