[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unwanted simultaneous plots...



PureBytes Links

Trading Reference Links

Here is a sample of the EasyLanguage you could use to conditionally plot
either one or the other value.

inputs: Price( Close ), Length( 10 ) ;

Value1 = RSI( Price, Length ) ;
if CurrentBar > 1 then begin
  if Value1 crosses over 70 then
    Value2 = 1
  else
  if Value1 crosses under 30 then
    Value2 = 2 ;

  if Value2 = 1 then
    Plot1( High + 1, "Value1" )
  else
  if Value2 = 2 then
    Plot2( Low - 1, "Value2" ) ;
end ;


Best regards,

Benjamin Blanco,
EasyLanguage Specialist
( former TradeStation Technologies, Inc. employee of six years )
http://www.benjaminblanco.com/

EasyLanguage is a registered trademarks of TradeStation Technologies, Inc.

----- Original Message -----
From: "Shraga(Feivi-Philip)" <shraga@xxxxxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Thursday, November 14, 2002 12:40 PM
Subject: unwanted simultaneous plots...


Hello everyone,

I have an indicator which calculates two values for me. I want to plot one
of them when in uptrend and the other in downtrend. Now, let's assume I
consider an uptrend if rsi(x) goes higher then 70, and the uptrend
continues until rsi(x) drops under 30, and vice versa. So here's what I
coded:

if rsi(x)>70 and rsi(x)[1]<70 then counter=1;
if rsi(x)<30 and rsi(x)[1]>30 then counter=2;
if counter=1 then plot1 (high+1, "value1");
if counter=2 then plot2 (low-1, "value2");

The problem is that here and there BOTH values plot on the same bar. I
don't see how that's even POSSIBLE!

Can anyone help me with this?

TIA

Philip