Skip to content

QuickTip 75 | Difference between Condition1 = C > O; and If C > O then Condition1 = TRUE;

Quicktip75-1

Quicktip 75 uses a TradeStation EasyLanguage show-me study to demonstrate the difference between:

Condition1 = Close > Open;
//and
If Close > Open then Condition2 = TRUE;

With the first expression (Condition1 = Close > Open;) if close is greater than open (i.e an up bar) the expression evaluates to true and Condition1 is set to TRUE, hence, in our simple example a show me dot is plotted at the high of the bar. If Close is less than or equal to open (i.e a down bar or Doji) then the expression, Close > Open evaluates to FALSE, Condition1 is set to False and the show-me dot is not plotted.

With the second expression, If Close > Open then Condition2 = TRUE; if the close is greater than the open (an ‘up’ bar) then Condition2 is set to true and a show-me dot is plotted at the low of the bar. If on a subsequent bar the close is less than or equal to open (i.e a down bar or Doji) then no change is made to Condition2. Hence once there has been an up bar Condition2 is set to true and remains true for all future bars and a show-me dot would be plotted at the low of these bars. This second expression acts as a sort of ‘ratchet.’

The third example is similar to the second in that if a bar is an ‘up’ bar then Condition3 is set to true, however if the bar becomes or is a down bar or Doji Condition3 is set to false. Therefore the first and third expressions give similar results.

Compatibility

This Quick-tip was developed in TradeStation version 10.0. It also works in MultiCharts.
Quick-tip 75 applied to a daily IBM chart
Quick-tip 75 applied to a daily IBM chart

Video explanation of quick-tip 75

Copy the quick-tip 75 TradeStation EasyLanguage code

You can copy the tutorial code below.

{ THIS SHOW ME STUDY 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 NO WARRANTY 
IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION IS AT YOUR OWN RISK. THIS SHOW ME 
STUDY AND ASSOCIATED TECHNIQUES IS AN EXAMPLE ONLY, AND HAS BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. 
MARKPLEX CORPORATION DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, INDICATORS, SHOWME 
STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS (OR ANY PARTS THEREOF) 
OR TECHNIQUES. THE USE OF THIS SHOW ME STUDY DOES NOT GUARANTEE THAT YOU WILL MAKE PROFITS, INCREASE PROFITS, 
OR MINIMIZE LOSSES.}

{ Quicktip 75 uses a TradeStation EasyLanguage show-me study to demonstrate the difference between:

Condition1 = Close > Open;
and 
If Close > Open then Condition2 = TRUE;

With the first expression (Condition1 = Close > Open;) if close is greater than open (i.e an up bar)
the expression evaluates to true and Condition1 is set to TRUE, hence, in our simple example a show 
me dot is plotted at the high of the bar. If Close is less than or equal to open (i.e a down bar or
Doji) then the expression, Close > Open evaluates to FALSE, Condition1 is set to False and the 
show-me dot is not plotted.

With the second expression, If Close > Open then Condition2 = TRUE; if the close is greater than the
open (an 'up' bar) then Condition2 is set to true and a show-me dot is plotted at the low of the bar. 
If on a subsequent bar the close is less than or equal to open (i.e a down bar or Doji)then no change 
is made to Condition2. Hence once there has been an up bar Condition2 is set to true and remains true 
for all future bars and a show-me dot would be plotted at the low of these bars. This second 
expresssion acts as a sort of 'ratchet.'

The third example is similar to the second in that if a bar is an 'up' bar then Condition3 is set to 
true, however if the bar becomes or is a down bar or doji Condition3 is set to false. Therefore the 
first and third expressions give similar results.

For more information about quick-tip 75 see: 
/}

// ******************************************************************************************************************************
// 1. Condition1 = Close > Open;
// ******************************************************************************************************************************

Condition1 = Close > Open;
If Condition1 = TRUE then Plot1( H );

// ******************************************************************************************************************************
// 2. If Close > Open then Condition2 = TRUE;
// ******************************************************************************************************************************

If Close > Open then Condition2 = TRUE;
If Condition2 = TRUE then Plot2( L );

// ******************************************************************************************************************************
// 3. If Close > Open then Condition3 = TRUE Else Condition3 = FALSE;
// ******************************************************************************************************************************

If Close > Open then Condition3 = TRUE 
Else Condition3 = FALSE;
If Condition3 = TRUE then Plot3( ( H + L ) / 2 ); 

{ ** Copyright (c) 2022 Markplex Corporation. All rights reserved. ** 
  ** Markplex Corporation reserves the right to modify or overwrite this analysis technique 
     on its https://markplex.com Web site. ** }

THE TRADING APPS, INDICATORS, SHOW ME STUDIES, STRATEGIES AND OTHER PROGRAMS HAVE BEEN INCLUDED SOLELY FOR EDUCATIONAL PURPOSES. 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, TRADING APPS, 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.