Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

The Henk

Inside Bar Indicator?

Recommended Posts

Hello The Henk,

 

I’m part of the Client Training and Education department for TradeStation. According to your posts, it appears that what you are really after is an indicator designed for RadarScreen that can show you when Inside Bars and CCCs take place on a daily chart real-time on a daily basis. You also seem to be content with your chart indicator, therefore no chart indicator is included in this response. The code below is for an indicator that identifies Inside Bars, counts how many Inside Bars occurred consecutively, identifies CCCs, and counts how many occurred consecutively. I understand that you intend for the indicator to be applied to 20 or so FX pairs, however if you apply the indicator to a larger amount of securities (i.e. the components of the S&P 500 index), you may want to sort the results. To do so, simply right-click in the RadarScreen window, select “Format Page”, then select the “Sort” tab and select to sort first by IB Status and then by CCC Status. You can also specify to automatically keep the data sorted by a certain amount of seconds in the same window. Both fields have color coded backgrounds in RadarScreen for visual help.

 

// RadarScreen Indicator Code to identify Inside Bars and CCCs

 

// Inputs Declaration

Inputs: IBColor ( Red ),

CCCColor ( Blue );

 

// Variables Declaration

Vars: ibcondition ( false ),

ibstatus ( "" ),

ibcounter ( 0 ),

inside ( false ),

ccccondition ( false ),

cccstatus ( "" ),

ccccounter ( 0 ),

cccdisplay ( "" );

 

// Inside Bar (IB) Condition

ibcondition = high[1] > High and low[1] < low;

 

// Congestion, Convergence, Centering (CCC) Condition

inside = High <= high[1] and low >= low[1];

ccccondition = inside and inside[1];

 

// Check for IBs and CCCs

If ibcondition then

begin

ibstatus = "Inside Bar";

ibcounter = ibcounter + 1;

SetPlotBGColor(1, IBColor);

end

else

begin

ibstatus = "";

ibcounter = 0;

end;

 

If ccccondition then

begin

cccstatus = "CCC";

ccccounter = ccccounter + 1;

SetPlotBGColor(2, CCCColor);

end

else

begin

cccstatus = "";

ccccounter = 0;

end;

 

// Display Results in RadarScreen

if ccccounter >= 1 then

cccdisplay =( NumToStr(ccccounter, 0) + Spaces(2) + cccstatus )

Else

cccdisplay = "0 CCC";

 

If ibcounter >= 1 then begin

Plot1( NumToStr(ibcounter, 0) + Spaces(2) + ibstatus, "IB Status" );

Plot2( cccdisplay, "CCC Status" );

End

Else begin

NoPlot(1);

NoPlot(2);

end;

Edited by Soultrader
Redirect

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.