Trade Station Help Strategy

leb0x

Newbie
Messages
2
Likes
0
Hey everyone I'm new to the forum and am having a hell of a time with Trade Stations Easy language I have version 8.3 and cant seem to grasp the language. Basically I want to create a system and back test it. I have been doing it by hand for the last 8 months and want to go further using trade station. Essentially what the system does is find the price of the Dow at x time and then again at y time then it inputs the values for each into a formula and if the vale is greater then >=Z you buy 1 Dow futures contract if it is <Z your sell 1 dow contract. Does anyone have any idea how to start this I have been ready the manual and watching tutuorials and cant seem to find what i need. Any help would be great. Thanks!
 
So what have you got so far? Give us something to work with.
 
So what have you got so far? Give us something to work with.

Thats the problem I have tried several different formats but I can't find anything that will buy based on the value of certain time intervals. I tried to start it this is the only thing I could figure out. But it actually does nothing. Im completely new to tradestation.
input: bcondition(open of 0952)-(open of 1052)

If bcondition >= 25 then
buy 100 ("INDU") next bar at market
If bcondition < 25 then
sell 100 ("INDU") next bar at market.
 
I'm not amazing w/ ESL but I found my best help was using the builtin strategies for help when I needed it.
 
Thats the problem I have tried several different formats but I can't find anything that will buy based on the value of certain time intervals. I tried to start it this is the only thing I could figure out. But it actually does nothing. Im completely new to tradestation.
input: bcondition(open of 0952)-(open of 1052)

If bcondition >= 25 then
buy 100 ("INDU") next bar at market
If bcondition < 25 then
sell 100 ("INDU") next bar at market.

leb0x

Try something along the lines of:

Input:
start_time(1452), end_time(1552), bcondition(25);

Vars:
start_price(0), end_price(0), price_difference(0);

if time = start_time then start_price = Open;

if time = end_time then Begin
end_price = Open;
price_difference = end_price - start_price;
end ;

If time = end_time and price_difference >= bcondition
then buy("Buy") 100 contracts next bar at market;


If time = end_time and price_difference < bcondition
then sellshort("Sell") 100 contracts next bar at market ;



print("current time: ", time, " start time: ", start_time, " start_price: ", start_price, " end time: ", end_time, " end price: ", end_price);


Insert the strategy into a 1 min chart of the $INDU.

If you use the option "view easy language output bar" you can see the figures it is producing for debugging purposes. Use right click in the log to clear it, if you want to rerun it.

Use view strategy performance report and you will see the order it has generated. There are inputs for both the start and end times and the size of the price difference.

It will need more work on it, but it gives a starter.

Charlton
 
Hi Charlton, what version of TS are you on? I don't have that EL output bar on my trusty TS4.
 
Top