EasyLanguage Treasure Chest

Discussion in 'Trading Software' started by Tums, Nov 24, 2008.

Thread Status:
Not open for further replies.
  1. Tums

    Tums

    If you take the trouble to read the links you have posted, you will find the answers waiting for you right there all along.
     
    #81     Dec 18, 2008
  2. Tums

    Tums

    Bollinger Band Squeeze (BBS) Indicator

    A variation of an idea by nickm001 (Originally coded by eKam) that when Bollinger Bands (BB) fit inside the Keltner Channel (KC), a breakout is about to occur. It works on longer term charts, such as 15 minute to daily charts.

    This code creates an indicator that plots the ratio of BB width to KC width. When BB and KC widths are the same, the ratio (BBS_Ind) is equal to one (1). When the BB width is less than the KC Width (i.e. BB fit inside KC), the BBS_Ind is less than one and a breakout is indicated.

    An Alert Line is provided to indicate the level at which the trader considers that the "sqeeze is on" and a breakout is eminant.

    Coded by Kahuna 9/10/2003
    subsequently edited and improved by many.

    <img src=http://www.elitetrader.com/vb/attachment.php?s=&postid=2229932>



    click on attachment link below to download the code
     
    #82     Dec 19, 2008
  3. Tums

    Tums

    .
     
    #83     Dec 19, 2008
  4. Tums

    Tums

    Inside Ask Bid

    This program prints the Inside Bid and Inside Ask on the chart.
    You can choose to show the Bid/Ask as number or arrow.

    Note: because most charting software are tick driven, i.e. it will only recal and update if there is a trade, therefore the bid/ask shown on the chart by this program is based on the bid/ask when last trade happened. If there is a change in bid/ask before the next trade happens, this new bid/ask will not be reflected on the chart. During thin market conditions, you might see a trade "appears" to push through the Bid/Ask boundary.


    P.S. Program updated to work on the following charts: Hour, Minute, Second, Tick, Contract, Points(Range).
    Edit: 20081221 bug fix

    <img src=http://www.elitetrader.com/vb/attachment.php?s=&postid=2230896>


    Code:
    [color=blue]
    // InsideAskBid
    // Author: TUMS
    // Date: 20081220
    // Licence: Public use
    // This program prints the Inside Ask and Inside Bid on the chart
    // You may show the Bid/Ask as number or arrow
    // This program work on the following charts: Hour, Minute, Second, Tick, Contract, Points(Range).
    
    inputs:
    ShowNumber(true),
    Color(black),
    size(10);
       
    variables:
    AskID(-1),
    BidID(-1),
    offset(0);
    
    if bartype_ex = 2 then offset = barinterval * 100
    else
    if bartype_ex = 3 then offset = barinterval * 10000
    else
    if bartype_ex = 1 or bartype_ex = 8 or bartype_ex = 11 or bartype_ex = 13  then offset = 1
    else
    offset = barinterval;
    
    
    if currentbar = 1 then
    begin
    	AskID = Text_New_s(date,time_s, InsideAsk, NumToStr(insideAsk,2));
    	BidID = Text_New_s(date,time_s, InsideBid, NumToStr(insideBid,2));
    	
    end; 
    
    if ShowNumber then
    begin
    	Text_setstring(AskID, NumToStr(insideAsk,2));
    	text_setcolor(AskID, Color);
    	text_setstyle(AskID, 0, 1);
    	text_setsize(AskID, size);
    	Text_setlocation_s(AskID, date,time_s + offset, InsideAsk);
    
    	Text_setstring(BidID, NumToStr(insideBid,2));
    	text_setcolor(BidID, Color);
    	text_setstyle(BidID, 0, 0);
    	text_setsize(BidID, size);
    	Text_setlocation_s(BidID, date,time_s + offset, InsideBid);
    end
    else
    
    begin
    	Text_setstring(AskID, "<");
    	text_setcolor(AskID, Color);
    	text_setstyle(AskID, 0, 2);
    	text_setsize(AskID, size);
    	Text_setlocation_s(AskID, date,time_s + offset, InsideAsk );
    
    	Text_setstring(BidID, "<");
    	text_setcolor(BidID, Color);
    	text_setstyle(BidID, 0, 2);
    	text_setsize(BidID, size);
    	Text_setlocation_s(BidID, date,time_s + offset, InsideBid );
    end;
    [/color]
    
     
    #84     Dec 20, 2008
  5. Anyone want to create a Slow Stoch where the line thickness of the K and D lines increases during overbought and oversold instead of plotting the overbought and oversold lines?
     
    #85     Dec 20, 2008
  6. Just copy into new indicator window and verify. Width input determines width of line.

    Code:
    [color=blue]
    [SameTickOpt = True];
    
    inputs: 
    	PriceH(  High),  
    	PriceL(  Low), 
    	PriceC(  Close), 
    	StochLength( 7), 
    	SmoothingLength1( 3), { used to slow FastK to FastD = SlowK }
    	SmoothingLength2(  3), { used to slow FastD to SlowD }
    	SmoothingType(  1), { pass in 1 for Original, 2 for Legacy }
    	OverSold(  25), 
    	OverBought(  75),
         Width(2);
    
     
     	variables:
    	oFastK( 0 ), 
    	oFastD( 0 ), 
    	oSlowK( 0 ), 
    	oSlowD( 0 ) ;
    
    Value1 = Stochastic( PriceH, PriceL, PriceC, StochLength, SmoothingLength1, 
     SmoothingLength2, SmoothingType, oFastK, oFastD, oSlowK, oSlowD ) ;
    
    Plot1( oSlowK, "SlowK" ) ;
    Plot2( oSlowD, "SlowD") ;
    Plot3( OverBought, "OverBot" ) ;
    Plot4( OverSold, "OverSld" ) ;
    Plot5(50,"ML");
    
    If Plot1 > overbought then setplotwidth(1,width);
    if plot1 < oversold then setplotwidth(1,width);
    
    
    
    { Alert criteria }
    if CurrentBar > 2 then
    	begin
    	if oSlowK crosses over oSlowD and oSlowK < OverSold then { CB > 2 check used to
    	 avoid spurious cross confirmation at CB = 2 (at CB = 1, MySlowK and MySlowD will
    	 be the same) }
    		Alert( "SlowK crossing over SlowD" )
    	else if oSlowK crosses under oSlowD and oSlowK > OverBought then
    		Alert( "SlowK crossing under SlowD" ) ;
    	end ;
    [/color]
    
     
    #86     Dec 20, 2008
    Techguy likes this.
  7. #87     Dec 20, 2008
  8. Tums

    Tums

    Time Price Opportunities

    Part of the Market Profile® concept.

    (Market Profile® is a registered trademark of the Chicago Board of Trade. )

    <img src=http://www.elitetrader.com/vb/attachment.php?s=&postid=2231602>

    Code in next post.
     
    • tpo.gif
      File size:
      13.4 KB
      Views:
      13,053
    #88     Dec 21, 2008
  9. Tums

    Tums

    Time Price Opportunities
    Code in text format

    Right click on link, save... to download to your computer.
     
    • tpo.txt
      File size:
      8.2 KB
      Views:
      1,221
    #89     Dec 21, 2008
  10. Tums

    Tums

    BB BandWidth Indicator

    BWI is a measure of an instrument's ability/tendency to trend.
    It responses faster than ADX, and reset itself earlier.
    When the BWI is low, there isn't any trend...
    When it has a positive slope, there is a trend.
    When a trend is lost, it can lead to a RTM movement.


    <img src=http://www.elitetrader.com/vb/attachment.php?s=&postid=2232658>

    code in next post.
     
    #90     Dec 22, 2008
Thread Status:
Not open for further replies.