I need a little help

cbasi

Newbie
Messages
1
Likes
0
Hi
I'm an italian student.
I wish to create a simple trading system by Tradestation but I'm not able.

I wold like to give these conditions to the system:

> buy if the last day of the month is superior to the monthly moving average of 5 periods

> exit long if last day of month is lower to the monthly moving average of 5 periods

No stop loss and no short position.

I'm looking for in the easy language manual but I don't find what i'm lokking for.

Please help me!
Thanks !
Carlo
 
Hi Carlo,

This should get you started:

You will need a chart with Daily bars as Data1 and Monthly bars as Data2 .

Try this code:

If DayOfMonth(date) = LastDayOfMonth(month(date)) and Close > Average(Close of Data2, 5) then Buy next bar at Open ;

If DayOfMonth(date) = LastDayOfMonth(month(date)) and Close < Average(Close of Data2, 5) then Sell next bar at Open ;


Hope this helps,

Chris
 
Top