Welcome to Markplex tutorial 39 in this collection of tutorials designed to teach TradeStation EasyLanguage programming skills. EasyLanguage is a programming language that was developed for the Tradestation trading platform that can be used to write programs to help in the trading of FX, commodities (e.g. the S&P e-mini), options and stocks. Please join our email mailing list if you have not already done so and we will let you know when we release new tutorials or programs.
When writing EasyLanguage programs it is not uncommon to want to make certain parts of the program only run between certain times. For example, you might want to base a trade on the maximum price occurring between two times, or only enter a trade if certain conditions were fulfilled between specific times.
This simple demonstration program demonstrates how to restrict parts of a program to run between two times on the same day, and between start time one day and an end time on the next.
This is a beginner level tutorial that uses a simple show-me study to demonstrate the programming techniques.
Tutorial 39 Video – Start and end times
Program code used in this tutorial
Input: StartTime( 1000 ), EndTime( 1400 ), NextDayEndTime( 0600 ); Condition1 = T >= StartTime and T <= EndTime; Condition2 = T > StartTime and T < NextDayEndTime; Condition3 = T > NextDayEndTime and T < StartTime; If Condition3 = FALSE then Plot1( L, " ", Blue );
If you see any errors in this tutorial – or we have not made something clear, we would be most grateful if you could please let us know. E-mail us at: email@example.com. Also, let us know if you have any ideas for new tutorials.
TO THE BEST OF MARKPLEX CORPORATION’S KNOWLEDGE, ALL OF THE INFORMATION ON THIS PAGE IS CORRECT, AND IT IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION AND/OR PROGRAM(S) DESCRIBED, AND NO WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION AND/OR PROGRAMS DESCRIBED IS AT YOUR OWN RISK.
ANY EASYLANGUAGE OR POWERLANGUAGE TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (AND PARTS THEREOF) AND ASSOCIATED TECHNIQUES REFERRED TO, INCLUDED IN OR ATTACHED TO THIS TUTORIAL OR PROGRAM DESCRIPTION ARE EXAMPLES ONLY, AND HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. MARKPLEX CORPORATION. DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF ANY SUCH TRADING STRATEGIES, SIGNALS, STUDIES, INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS AND TECHNIQUES DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.