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

Re: AW: coding questing regarding plot statements



PureBytes Links

Trading Reference Links

nevertheless i prefer TS code Volker.
Alexandra

 --- VK <volker@xxxxxxxxxxxxxx> schrieb: > I just love
to create these things with drag and
> drop. :)
> 
>  
> 
> 
> 
>  
> 
> Note, this was done with Wealth-Lab and NOT TS.
> 
>  
> 
> But here is the code:
> 
>  
> 
> var RSISer, RSIPane, RSISer1, RSIPane1: integer;
> 
> var Bar, p: integer;
> 
> RSISer := RSISeries( #Close, 14 );
> 
> RSISer1 := RSISeries( #Close, 14 );
> 
> RSIPane := CreatePane( 100, true, true );
> 
> PlotSeries( RSISer, RSIPane, #Navy, #Thick );
> 
> DrawLabel( 'RSI(#Close,14)', RSIPane );
> 
> DrawHorzLine( 60, RSIPane, #red, #Thick );
> 
> DrawHorzLine( 25, RSIPane, #black, #Thick );
> 
> DrawHorzLine( 70, RSIPane, #green, #Thick );
> 
> DrawHorzLine( 30, RSIPane, #blue, #Thick );
> 
> for Bar := 20 to BarCount - 1 do
> 
> begin
> 
>   if LastPositionActive then
> 
>   begin
> 
>     p := LastPosition;
> 
>     if CrossUnderValue( Bar, RSISer1, 70 ) then
> 
>     begin
> 
>       SellAtMarket( Bar + 1, p, '' );
> 
>     end;
> 
>   end
> 
>   else
> 
>   begin
> 
>     if not LastPositionActive then
> 
>       if CrossOverValue( Bar, RSISer, 30 ) then
> 
>       begin
> 
>         BuyAtMarket( Bar + 1, '0' );
> 
>       end;
> 
>   end;
> 
> end;
> 
>  
> 
>  
> 
>  
> 
>  
> 
> ||-----Ursprüngliche Nachricht-----
> 
> ||Von: AlexandraL. [mailto:lexxa01@xxxxxxxx]
> 
> ||Gesendet: Tuesday, December 09, 2003 10:01 AM
> 
> ||An: omega-list@xxxxxxxxxx
> 
> ||Betreff: coding questing regarding plot statements
> 
> ||
> 
> ||hello all,
> 
> ||
> 
> ||maybe it's a very simple questions but i'm not a
> 
> ||programing guru.
> 
> ||i need 5 plot statements in one indicator.
> 
> ||i just want to draw an RSI with 4lines ( not only
> 70 /
> 
> ||30 but also 80 /20). at the moment i have to use
> two
> 
> ||indictors but i think i have seen solutions where
> i
> 
> ||could plot more than 4 lines. ( some if statements
> 
> ||would do this)
> 
> ||so maybe there is a little trick which someone
> could
> 
> ||tell or better write down.
> 
> ||thanks
> 
> ||Alexandra
> 
> ||
> 
>  
> 
>