Dear Easy Language People:
I am trying to put together a simple strategy program to:
Place either a long or short market order at a specific time of the day.
This order should be able to do the following.
Enter at a specific time.
Enter number of contracts.
Choose between long of short entry.
Once the order is set it should be reoccurring without having to set the date.
This will allow me to back test without having to reset the date for each day.
Example: The strategy could-
Place a market order at 0930 hrs. (everyday)
Long (or short)
Number of contracts (10)
I have tried to come up with the easy language program for this and have the following, but it will not verify.
--------------------------------------------------------------------------------
inputs:
LongOrShort( 1 ), { pass 1 to buy long, 2 to sell short }
Quantity( 10 ),
EntryBarTime_HHMM( 1300 ) ; { for intraday chart, pass in time of bar at which entry should occur, 24 hr format; entry will occur at the OPEN of the specified
bar; for daily chart, time is ignored, can pass in 0 }
variables:
if Time next bar = EntryBarTime
and ( BarType = 2 or ( BarType = 1 and Time next bar = EntryBarTime_HHMM ) )
then
if LongOrShort = 1 then
Buy Quantity shares next bar at market
else
Sell Short Quantity shares next bar at market ;
--------------------------------------------------------------------------------
Can you help me fix it???
Thanks