Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 09-03-2009, 10:59 PM   #9

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,590
Ignore this user

Thanks: 2,027
Thanked 1,402 Times in 862 Posts



Re: Color Code MA for Range Bar Indicator

Quote:
Originally Posted by hrshukla »
can someone post codes to plot point on an indicator i.e. CCI (2nd paragraph plotted with 133 tick as data1) to show Open of Range Expansion Bar.I am using MC.

can you post a mock up?
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote
Old 09-04-2009, 12:02 AM   #10

Join Date: Apr 2009
Location: newyork
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts



Re: Color Code MA for Range Bar Indicator

Tams, I do not know how to post mock,
hrshukla is offline  
Reply With Quote
Old 09-04-2009, 12:40 AM   #11

Join Date: Apr 2009
Location: newyork
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts



Re: Color Code MA for Range Bar Indicator

Tams, what is mock and how i post it
hrshukla is offline  
Reply With Quote
Old 09-04-2009, 01:04 AM   #12

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,590
Ignore this user

Thanks: 2,027
Thanked 1,402 Times in 862 Posts



Re: Color Code MA for Range Bar Indicator

Quote:
Originally Posted by hrshukla »
Tams, what is mock and how i post it
a mock up is a hand drawn chart; a model to illustrate the position and format of your proposed plots.

for posting attachments:
when you are making reply to this post, look under the message box, you will see a section for Additional Options. Look for the "Manage Attachments" button
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote
Old 09-08-2009, 05:07 PM   #13

Join Date: Apr 2009
Location: newyork
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts



Re: Color Code MA for Range Bar Indicator

Tams;
i have attched Mock . 2nd paragraph , ihave cci indicator valuecci = cci(ccilength)
circle shows cci value when LBclose and new bar begins. i wanted to plot those Point on cci when LBclose . !st paragraph has 233 tick chart as data1 and Range Expansion Bar indicator
(codes for that are posted in the begining of this topic.
hrshukla is offline  
Reply With Quote
Old 09-08-2009, 05:18 PM   #14

Join Date: Apr 2009
Location: newyork
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts



Re: Color Code MA for Range Bar Indicator

Tams ; finally Mock is attached
Attached Thumbnails
Color Code MA for Range Bar Indicator-picture1.png  
hrshukla is offline  
Reply With Quote
Old 09-13-2009, 02:24 PM   #15

Join Date: Apr 2009
Location: newyork
Posts: 6
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts



Re: help correct the attached code

follwing codes ,modified from range expension bars code provided by
snowbird. I wanted to plot point when RB close. attached codes does it but not on top of cci. dots as shown in Mock , points plotted are not aligned on top of cci indicator.
can some one help tocorrect the codes so that points can be plotted on top of cci

//Range Expansion Bars by Uli Schmuli

inputs: BarRange(3.75),ccilen(14) ,
PlotRangeBars(true),
PlotExpansionBars(true),
PlotExpansionPotential(tr ue),
BullBarColor(green),
BearBarColor(red),
RBThickness(3),
PlotEMA34(true),
PlotLSMA(true);

var:RangeHigh(0),
RangeLow(0),
RangeOpen(open),
RangeClose(0),
RBcolor(green),
LBLow(0),
LBHigh(0),
LBOpen(0),
LBClose(0),
offset(0),
LBxAvg(0),
SmoothingFactor(2/35),mycci(0),
LSMAtemp(0);

Array: EMA34[100](0),
RBHigh[100](close),
RBLow[100](close),
RBOpen[100](Close),
RBClose[100](close),
LSMA[100](close),
hvalue[100](0);
mycci = cci(ccilen);
if barnumber = 1 then //1st bar initialization

begin

if range < BarRange then
begin
RangeHigh = high;
RangeLow = Low;
end;

if range > BarRange then
begin
RangeHigh = High;
RangeLow = Low;
end;
hvalue[1] = mycci;
LSMA[1] = close;
EMA34[1] = close;
RBclose[1] = close;
LSMA[1] = close;
LBopen = open;

end else //all other bars

Begin
if date <> date[1] then //new day, begin new bar & close out prior bar

begin
LBHigh = RangeHigh;
LBlow = RangeLow;
LBOpen = RangeOpen;
LBclose = iff(close<RBclose[1],RangeLow,RangeHigh);
For Value1 = 100 downto 2
begin
hvalue[value1] = hvalue[value1-1];
EMA34[value1] = EMA34[value1-1];
RBHigh[value1] = RBHigh[Value1-1];
RBLow[value1] = RBLow[Value1-1];
RBOpen[value1] = RBOpen[Value1-1];
RBClose[value1] = RBClose[value1-1];
LSMA[value1] = LSMA[value1-1];
end;

RBHigh[1] = LBHigh;
RBLow[1] = LBLow;
RBOpen[1] = LBOpen;
RBClose[1] = LBClose;
hvalue[1] = mycci;
EMA34[1] = EMA34[2] + SmoothingFactor * (RBclose[1] - EMA34[2]);
value1 = LinRegArray(RBClose,25, 0, value2, value3,value4, LSMAtemp);
LSMA[1] = LSMAtemp;
RangeOpen = Open;
RangeHigh = High;
RangeLow = low;
RangeClose = close;
offset = 1;
end;

if offset[1] = 1 and date = date[1] then offset = 0;
if low >= rangelow and high <= rangehigh then //Bar totally in barrange
begin


end;

if high > Rangehigh and low >= rangelow then //new high value
begin


rangehigh = high;

If high - rangelow > barrange then //New Higher bar detected
begin
LBlow = RangeLow;
LBHigh = RangeLow + BarRange;
LBOpen = RangeOpen;
LBclose = LBHigh;
For Value1 = 100 downto 2
begin
hvalue[value1] = hvalue[value1-1];
EMA34[value1] = EMA34[value1-1];
RBHigh[value1] = RBHigh[Value1-1];
RBLow[value1] = RBLow[Value1-1];
RBOpen[value1] = RBOpen[Value1-1];
RBClose[value1] = RBClose[value1-1];
LSMA[value1] = LSMA[value1-1];
end;
hvalue[1] = mycci;
RBHigh[1] = LBHigh;
RBLow[1] = LBLow;
RBOpen[1] = LBOpen;
RBClose[1] = LBClose;
EMA34[1] = EMA34[2] + SmoothingFactor * (RBclose[1] - EMA34[2]);
value1 = LinRegArray(RBClose,25, 0, value2, value3,value4, LSMAtemp);
LSMA[1] = LSMAtemp;

rangeopen = Rangelow + barrange;
rangeLow = Rangelow + barrange;
RangeClose = rangeopen;
offset = 1;
end;
end;

if low < RangeLow and high <= rangehigh then//new low value
begin
Rangelow = low;

if rangehigh - low > barrange then //New lower bar detected
begin
LBHigh = RangeHigh;
LBlow = RangeHigh - barrange;
LBOpen = RangeOpen;
LBclose = LBlow;
For Value1 = 100 downto 2
begin
hvalue[value1] = hvalue[value1-1];
EMA34[value1] = EMA34[value1-1];
RBHigh[value1] = RBHigh[Value1-1];
RBLow[value1] = RBLow[Value1-1];
RBOpen[value1] = RBOpen[Value1-1];
RBClose[value1] = RBClose[value1-1];
LSMA[value1] = LSMA[value1-1];
end;
RBHigh[1] = LBHigh;
RBLow[1] = LBLow;
RBOpen[1] = LBOpen;
RBClose[1] = LBClose;
hvalue[1] = mycci;
EMA34[1] = EMA34[2] + SmoothingFactor * (RBclose[1] - EMA34[2]);
value1 = LinRegArray(RBClose,25, 0, value2, value3,value4, LSMAtemp);
LSMA[1] = LSMAtemp;

RangeOpen = LBclose;
RangeHigh = LBclose;
RangeLow = low;
RangeClose = close;
offset = 1;
end;
end;

if high > RangeHigh and Low < RangeLow and rangehigh - rangelow > barrange then//engulfing bar
begin
RangeLow = low;
RangeHigh = high;
end;
end;



begin

if offset = 1 then //new bar begun
begin

if RBclose[1] < RBclose[2] then RBcolor = BearBarColor else RBcolor = BullBarColor;

plot19[1](hvalue[value1],"ccpoint",RBcolor,defaul t,RBThickness);
end;





end;
Attached Thumbnails
Color Code MA for Range Bar Indicator-picture1.png  
hrshukla is offline  
Reply With Quote
Old 09-13-2009, 03:08 PM   #16

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,590
Ignore this user

Thanks: 2,027
Thanked 1,402 Times in 862 Posts



Re: help correct the attached code

Quote:
Originally Posted by hrshukla »
follwing codes ,modified from range expension bars code provided by
snowbird. I wanted to plot point when RB close. attached codes does it but not on top of cci. dots as shown in Mock , points plotted are not aligned on top of cci indicator.
can some one help tocorrect the codes so that points can be plotted on top of cci

I am not sure if I understand what you mean/want.

you can put the mock up in the Paint program and add arrows/lines to point out to the specific place you are talking about... then add notes on the chart to describe the following:

1. what the code is doing now,
2. what you want the code to do.
3. what is triggering the "highlight" on the chart.
__________________


..........This is a terribly difficult question to answer. The only satisfactory answer is: "It depends"...
Tams is offline  
Reply With Quote

Reply

Tags
color, plot

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ninjatrader: Access Color of Another Indicator taotree Coding Forum 0 07-25-2009 11:46 PM
Triangle Pattern Indicator Code Not Working clbradley Coding Forum 16 04-27-2009 09:36 PM
IB Range Indicator for CQG Soultrader Trading Indicators 0 12-09-2008 03:47 AM
SPY Opening Range Volume Vs Days Range darthtrader Technical Analysis 3 04-17-2008 11:54 AM
Opening 15m Range Indicator rwalkerx Trading Indicators 1 03-01-2007 08:09 PM

All times are GMT -4. The time now is 05:32 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.