PDA

View Full Version : Slope CCI Max error


RitaPacheco
07-13-2010, 03:48 AM
Hi

Can you please tell me why I have an error Type:The best overloaded method match for 'NinjaTrader.Indicator.Indicator.MAX(NinjaTrader.D ata.IDataSeries, int)' has some invalid arguments on this code?


// Max Slope CCI
slopeMax = MAX(Slope(CCI(period),barsAgoSwingH,0),barsAgo_ext remesXup)[Math.Min(CurrentBar, 1)];


I have this code similar that is ok, why? The only thing different is CCI(period) was changed by Slope(CCI(period),barsAgoSwingH,0) on the code before.

// Max CCI
swingHigh = MAX(CCI(period),barsAgo_extremesXup)[Math.Min(CurrentBar, 1)];

Thanks

NinjaTrader_Bertrand
07-13-2010, 04:09 AM
Rita, Slope would just return a single double value and not a dataseries value as your CCI, however MAX expects a series input and hence the compiler throws an error. You would need to create a custom series containing the slope for each bar and then feeding this into the MAX() method -

http://www.ninjatrader-support.com/HelpGuideV6/DataSeriesObject.html

RitaPacheco
07-13-2010, 05:06 AM
Thanks again Bertrand

Now I only have 2 errors: ";" expected on 3th DataSeries and invalid ")" , on same line, I can not understand this in my opinion all ";" and ")" are correct. Can you please tell me what is incorrect? Only has errors on the 3th line of DataSeries - 1st and 2nd seems ok probably 4th line will be error as well

Thanks

Code

// Calculate the DataSeries of the current bar and set the value
slopeMaxCCIDataSeries.Set(Slope(CCI(period),barsAg oSwingH,0));
slopeMinCCIDataSeries.Set(Slope(CCI(period),barsAg oSwingL,0));
slopeMaxTurboDataSeries.Set((CCI(turbo)[0] - CCI(period)[barsAgoSwingH]) / barsAgoSwingH);
slopeMinTurboDataSeries.Set((CCI(turbo)[0] - CCI(period)[barsAgoSwingL]) / barsAgoSwingL);

NinjaTrader_Bertrand
07-13-2010, 05:31 AM
Rita, are turbo, period and barsAgoSwingHL all defined as Int's?

RitaPacheco
07-13-2010, 05:40 AM
Thanks Bertrand

The errors disaoeared after compile without change anything!

Thanks

RitaPacheco
07-14-2010, 06:37 AM
Can you please tell me why next code give me always 2 bars with No.1 first bar and bar before first bar? (I see this if I print it to output window)

I tried use a Swing CCI High data series insted CCI(period) [0] but densn't work ( on Print if I do Print(cciSwingHighDataSeries [0] == swingHigh); give me "true" if I change CCI(period) [0] by cciSwingHighDataSeries [0] on the next code the indicator desapear , show me nothing )


int barsAgoSwingH = MRO(delegate{return CCI(period) [0] == swingHigh;},1,CurrentBar);


Thanks

NinjaTrader_Bertrand
07-14-2010, 07:23 AM
Rita, how are you defining the swingHigh - would that update to include the most recent completed bar in your calculations?

RitaPacheco
07-14-2010, 07:41 AM
Thanks Bertrand

swingHigh is like this:


swingHigh = MAX(CCI(period),barsAgo_extremesXup)[Math.Min(CurrentBar, 0)];




barsAgo_extremesXup = MRO(delegate{return (CCI(period)[0] > extremes
&& (CCI(period)[Math.Min(CurrentBar, 1)]==0 ?
CCI(period)[Math.Min(CurrentBar, 2)]<extremes
: CCI(period)[Math.Min(CurrentBar, 1)]<extremes));},1,CurrentBar) +1;


Thanks

NinjaTrader_Bertrand
07-14-2010, 09:50 AM
Rita, ok thanks - please print the associated values in your calculations and also those you feed into other methods so you compare them for accuracy and returning expected results. Your MAX call likely includes the most recent high created as you move forward, as your lookback includes the CurrentBar.

RitaPacheco
07-15-2010, 09:51 AM
Thanks Bertrand

I already print all values that I working on. My problem is I don't know how I find Min ValueSlope >0 and Max ValueSlope <0.

I'm using (slopeMax = MAX(slopeMaxCCIDataSeries,barsAgoSwingH)[Math.Min(CurrentBar, 0)]; ____ And____slopeMin = MIN(slopeMinCCIDataSeries,(barsAgoSwingL))[Math.Min(CurrentBar, 0)]; )

When I use a dataserie to find the slope than I find Min/Max of dataserie, but on Swings usually there are 2 bars No.1 because if we have 2 consecutive match point of dataserie with Min ValueSlope but next on is my point. This happen because I didn't separete MinValueSlope>0 from MaxValueSlope<0

It could be samething like: (slopeMax =slopeMaxCCIDataSeries[0]<0? MAX(slopeMaxCCIDataSeries,(barsAgoSwingH))[Math.Min(CurrentBar, 0)]:-9999; ) but NT show me nothing of nothing.

Can you tell me please how I fix this?

Thanks

NinjaTrader_Bertrand
07-15-2010, 10:26 AM
Rita, I believe the easiest would be if you record the min / max slope yourself in 2 variables activated by the slope being positive or negative. Just initialize your min holding variable for example with a very high value like 9999 and then record the current slope if it's smaller than previous min value, if's not then just keep the prior saved value - your min. Same would apply to finding the max.

RitaPacheco
07-16-2010, 05:04 AM
Thanks Bertrand it worked fine.

Can you please tell me what I have to do for a DrawArrowUp stay on the indicator panel?

My indicator is on panel 2 but Arrow goes to panel 1.

Thanks

NinjaTrader_Bertrand
07-16-2010, 05:09 AM
Great Rita - you could set DrawOnPricePanel to false in your indicator's Initialize().

RitaPacheco
07-16-2010, 06:34 AM
Thanks Bertrand

After to do a compline ok I opaned the add indicators to do ok. NT had a crach in this point. than I restarted the pc and NT opened but no grafics have show. I did a NT repair on control panel add and remove programs.

Now I open NT and it donsn't show the grafics is open but in crach no reacting. What do I do now?


Thanks

NinjaTrader_Bertrand
07-16-2010, 06:55 AM
Ria, can you please direct the trace / logs from the crash via Help > Mail to Support to me for review?

It sounds like the crash unfortunately corrupted your workspace, have you tried using a brand new one already?

Thanks

RitaPacheco
07-17-2010, 09:06 AM
Thanks Bertrand

Long time later I restarted NT grafic shows up than I reimport my script and it stay stable.

Now I discovered that my NT don't show any kind of DrawLines (Line,Ray,Horizontal....) that is on a script on Price Panel, but on others panels shows. Because that Automate TrendLine indicator and ohters indicators that is on Forum to show a Line on Close don't work on my NT. I did a simple test with next 2 codes on Panel 2 shows the line on Price Panel no (2nd CODE is equal to the 1stCODE only changed CCI(period)[....] by Low[....] )

Can you please tell me why?

Thanks

1stCODE:

if (Close[0]>0 )
{
// Draws a Ray line
DrawRay("taga3" ,5, CCI(period)[5] ,0 , CCI(period)[0 ], Color.White,DashStyle.Solid,2);
}


2ndCODE:


if (Close[0]>0 )
{
// Draws a Ray line
DrawRay("taga3" ,5, Low[5] ,0 , Low[0 ], Color.White,DashStyle.Solid,2);
}

NinjaTrader_Ben
07-17-2010, 09:21 AM
Hello,

I am jumping in here, but I will try to assist.
I am sorry, there is a setting for that, but I am not recalling what it is at this moment. I will have someone reply on Monday with more info.

NinjaTrader_Austin
07-19-2010, 09:16 AM
Hi there, please try setting DrawOnPricePanel = true in the Initialize() section of your indicator.

NinjaTrader_RyanM
07-19-2010, 09:23 AM
Hello RitaPacheco,

Draw objects are placed on the price panel, or on the indicator panel that they're applied with. This is controlled by the property DrawOnPricePanel. (http://www.ninjatrader-support.com/HelpGuideV6/DrawPriceOnPanel.html)

In your example, there may be a big differences with the values for CCI and the values for Low. CCI values aren't going to be near market prices, and so your draw objects won't be visible here or will adjust the scaling of the chart substantially to accommodate.

RitaPacheco
07-19-2010, 01:42 PM
Thanks Austin for the SMAZeroLine Indicator now I already know to do it



Fine

Thanks

RitaPacheco
07-19-2010, 02:03 PM
Thanks RyanM (http://www.ninjatrader.com/support/forum/member.php?u=14321)

I understand what you mean with the big difference of values between CCI and Price.

I did the test separately of course. Even so I test it as well together and on 2nd panel works good (2 lines one on CCI values and other on the Price value level inside 2nd panel). When there is this problem Price panel expand automatically to see all indicators.

There is same thing that don't let me have DrawLines (any kind) on Price panel and is not DrawOnPricePanel = false; because I already tried to force with this command =true to have Lines on Price Panel.

On the other end there are 3 Indicators at least that don't work on my NT that work with lines on price panel and I didn't any thing on script (AutoTrendLine; PriceLine_Indicator; DH_HorizPriceLine) that is strange that with AutoTrendLine I can not see Lines but I see Arrows. And I have others indicators on price panel with Arrows that work fine the problem so far is only with Lines.

By the way is it possible blow-up the Arrow size any command to do it?

Thanks

NinjaTrader_RyanM
07-19-2010, 02:15 PM
Unfortunately there is no way to change the size of the arrow.

With regards to drawing on price panel: Let us know the code you're using to test this and check if there are any related messages in the log tab of the control center.

Also let us know the version of the platform you're using. Check with Help > About.

RitaPacheco
07-19-2010, 04:32 PM
Thanks RyanM

I 'm sending to you 5 scripts that don't work on my NT version 6.5.1000.16.

Only LineTest was done by me

Thanks

NinjaTrader_Josh
07-19-2010, 04:37 PM
RitaPacheco,

Please clarify what exactly isn't working? What does it do instead then? Any errors in Control Center logs? Thanks.

RitaPacheco
07-19-2010, 04:42 PM
No one works

Thanks

NinjaTrader_Josh
07-19-2010, 04:45 PM
RitaPacheco,

Please be clear how you determine it is not working. What happens instead if it is not working? Please confirm what you see in the Control Center logs.

RitaPacheco
07-20-2010, 01:00 PM
Thanks Josh

>>>Please be clear how you determine it is not working. <<<<<

It is not working because don't show any Line but on case of AutoTrendLine don't show Lines but show Arrows. Other ones don't show any thing because only have Lines.

<<<What happens instead if it is not working? >>>>

All others indicators working fine but not indicators that have Lines and if they are on Price Panel. I have others indicators with lines working good on Panel 2 with CCI indicator together,

<<<<<Please confirm what you see in the Control Center logs. >>>>

Everything normal lines white no signal of errors

Thanks

RitaPacheco
07-20-2010, 01:08 PM
Can you tell me please how to know how BarsAgo was last CCISwingHigh or CCISwingLow

I already tried with next code but don't give me exact value give the swing before last. I have the last SwingHigh at 2 barsAgo and it say 6 when was the preview SwingHigh


MRO(delegate{return (CCI(period)[0] == cciSwingHighDataSeries[0]);},1,CurrentBar));


cciSwingHighDataSeries.Set(Swing(CCI(period), 1).SwingHigh[0]);


Thanks

NinjaTrader_Austin
07-20-2010, 02:12 PM
Rita, for your scripts, you will have to debug the scripts. I opened one up to take a look, and I believe you are missing the autoscale argument for each drawing you wish to do. Also, depending on the background color of your charts, the ray might be invisible because the color is set to white.

Another possible issue could be the fact that on your drawing objects, you try to access data from a few bars ago, and on the first bar on the chart this could cause an issue because these bars don't yet exist. You can add a CurrentBar check to avoid this issue.

Please try the attached code for your RayTest script and let me know if you run into any issues.

NinjaTrader_RyanM
07-20-2010, 02:27 PM
RitaPacheco,

Unfortunately using MRO with swing won't necessarily return values you might expect. Swing is a type of indicator that repaints its value based on data points from the future. It works similar to ZigZag in this way. Depending on how it looked at the point in time when you set the DataSeries value it may actually be different when accessed historically. As such is the nature of Swing it does make it difficult to base logic on historical Swings since the historical points change.

I took a look at your indicator TesteLinhas. After applying I received the following message in the control center:
2010-07-20 14:34:21:099 ERROR: Error on calling the 'OnBarUpdate' method for indicator 'TesteLinhas' on bar 0: Index was out of range. Must be non-negative and less than the size of the collection.

You would need to make sure that you have enough bars for the series you're trying to access according to this article:
http://www.ninjatrader.com/support/forum/showthread.php?t=3170

Corrected by adding the following lines:
if (CurrentBar < 5)
return;

It then drew a white line. Please make the correction indicated above, apply to a black background, and let us know your results.

RitaPacheco
07-20-2010, 02:59 PM
Thanks Austin

I did my RayLine script as you did I dont see nothing of nothing.

My background color is LightSeaGreen I can see very well a white line (I put 5 on thickness) even so I already have others indicators with white lines on panel 2 as I told you before. This problem only happen on Price panel. Why? I don't know

Thanks

RitaPacheco
07-20-2010, 03:31 PM
Thanks RyanM

Do you segest to know how many barsago was last SwingHigh on CCI, I use samething like CCI(period)[2]<CCI(period)[1] && CCI(period)[1]>CCI(period)[0] insted CCI(period)[0] == cciSwingHighDataSeries[0]?

MRO(delegate{return (CCI(period)[0] == cciSwingHighDataSeries[0]);},1,CurrentBar));


cciSwingHighDataSeries.Set(Swing(CCI(period), 1).SwingHigh[0]);

Thanks

NinjaTrader_RyanM
07-20-2010, 03:46 PM
Because of the nature of these types of indicators, you can't expect a reliable MRO value. The occurrence of a SwingHigh is not known until future data arrives. These indicators are mainly used for their visual appearance. You can read more discussions on this indicator by doing a forum search for "Swing".

RitaPacheco
07-24-2010, 04:25 AM
Hi

Concerning the issue of I don't see DrawLine's using on scripts on Price Panel, I discovery now that all indicators with DrawLines functions on scripts are going to panel 2 where I already have indicators with DrawLine function working good. This happen even I ask to put on other panel different of panel 2. With AutoTrendLines indicator (posted on forum) the lines are going to panel 2 and Arrows stay on panel 1, indicator is allocated to panel 1.

Is this normal?

Thanks

RitaPacheco
07-24-2010, 08:43 AM
Can you please tell me which function give us BarsAgo consecutive bars of something without look back period argument as BarsAgo_Consecutive (Close[0]>Open[0])>0, tell us how BarsAgo consecutive green bars in a row in this case since first one once is >0 independentelly of the look back period.

CountIf(delegate {return Close[0] > Open[0];}, 10) > 0 and MRO(delegate{return Close[0]>Open[0] ;},1,CurrentBar); have occurences


Can you tell me if there is any operator for "And Not" if I wont exclud samething (&& is to include (and))

Close[0] > Open[0] && High[0]>High[1] & Not (......) if what is in (...) is true we have a true result if it is false we have a false result


Thanks

NinjaTrader_Bertrand
07-26-2010, 08:51 AM
Rita, you would need to set DrawOnPricePanel as needed for your indicators, if you want to mix panels, I suggest using an indicator for each panel with DrawOnPricePanel set as needed.

There's no operator for 'does not include' just set your conditions up to express the opposite to produce the final condition you're looking for then.

I'm not sure I fully follow on the BarsAgo issue, CountIf / MRO / LRO will need to get inputted how many bars to lookback - you could work by expressing this lookback dynamically / adaptively or custom coding your count then.

RitaPacheco
07-26-2010, 10:45 AM
Thanks Bertrand

I already had all indicators set DrawOnPricePanel= false that I want out of price panel, now I set DrawOnPricePanel=true for AutoTrend Lines that works on Price painel.

I doesn't fix the problem.

I set the inicators to panel 3, 4 or 1 and the indicators are showed on panel 2 for all of them, but on setup is 3, 4 etc.

I tried to open a new chart default I put AutoTrend Lines there and it doesn't show and here I only have this indicator

This must be other problem

Thanks

NinjaTrader_Bertrand
07-26-2010, 01:47 PM
Rita, it sounds like you're dealing with potentially corrupted workspaces here - can you please exit NT, go to the Documents\NinjaTrader 6.5\workspaces folder, move all XML out of this folder and then restart NT fresh. Then connect, open a chart and plot your indicators - are the drawing still not showing up as dictated by the DrawOnPricePanel settings? Please note that you can't direct those to a specific panel # though.

RitaPacheco
07-27-2010, 03:27 AM
Thanks Bertrand

Bingo! It works now very well. Can you please tell me why the workspaces was corrupted ?

Now other issue: why appears on Output Window 25-07-2010 23:00:29 decimals= f1
25-07-2010 23:00:29 decimals= f1 on the end? Is this an error?Nothing on Log. What to do? Same times appear others not.

My code is:
BarsAgo_XHMABarsup = MRO(delegate{return (CrossAbove(Close, HMA(slowperiod), 1));},1,CurrentBar) +1;//

BarsAgo_XHMABarsdown = MRO(delegate{return (CrossBelow(Close, HMA(slowperiod), 1));},1,CurrentBar) +1;//

Print("START");
if (BarsAgo_XHMABarsup > -1)
Print(BarsAgo_XHMABarsup);
if (BarsAgo_XHMABarsdown > -1)
Print(BarsAgo_XHMABarsdown);


END PRINT to OUTPUT WINDOW:

START
7
4
START
8
5
START
1
6
START
2
7
25-07-2010 23:00:29 decimals= f1
25-07-2010 23:00:29 decimals= f1

Thanks

RitaPacheco
07-27-2010, 06:07 AM
Can you please tell me which is the metod to calculate how many bar ago start a Rising SMA or a Falling SMA first occurence and 2nd occurence?

I use

BarsAgo_SMABarsup = MRO(delegate{return (Rising(SMA(slowperiod)));},1,CurrentBar) ;//


Give always 1 during the Rising because is always true and occurence is setting to 1 .
I could do with Rising(SMA(slowperiod))==false but give me a problem for 2nd occurence that would be 1 bar before 1st occurence in this case.

Thanks

NinjaTrader_Bertrand
07-27-2010, 10:25 AM
Rita, I suggest you custom code this, just record the barNumber then as your condition is true and you can calculate the difference between the currentBar and this saved barNumber to know how many bars have passed.

Workspaces could become corrupted on a crash or for example a power outage, unfortunately only a regular backup would help here to be able to recover quickly.

For the prints - I wouldn't know why you see the decimals print - please check all the Print statements in your complete NinjaScript's running to see where it may originate from.

RitaPacheco
07-31-2010, 02:42 AM
Hi

Can you please tell me how to reference Open, High,Low from secondary time frame in a multi time frame strategy? I want to have one line on Open of secondary time frame on primary chart.

I put like next and gave an error The best overloaded method match for 'NinjaTrader.Indicator.IndicatorBase.Close' is a 'property' but is used like a 'method' CS0118

if (Open(BarsArray[1][0])>0)
{

DrawLine("tag1", false, 0, Open(BarsArray[1][0]), 0, Open(BarsArray[1] [0]), Color.LimeGreen, DashStyle.Dot, 2);
}

Is it correct put bar start and bar end as 0 (Zero) on line?

Thanks

NinjaTrader_Josh
07-31-2010, 12:40 PM
RitaPacheco,

To get OHLC of a secondary time frame you would not use BarsArray[]. Instead you would uses Closes[][], Highs[][], etc. Note the extra "s" after the name.

Closes[1][0] would give you the secondary's close price for the current bar.

RitaPacheco
07-31-2010, 03:37 PM
Thanks Josh

I want to have on a 8 Ticks rangeBar a DrawLine with the Open of secondary timeframe 16Ticks RangeBar, but so far doesn't work. Can you please tell me what is wrong?

I put on Initialize()
Add(PeriodType.Range, 16);//16 ticks Range Bars chart as secondary Time frame

Than I tried to find the start bar of secondary Open with

barsAgoOpen = MRO(delegate{return Close [0] ==Opens[1][0];},1,CurrentBar);

Than ......

if (BarsInProgress == 0)
DrawLine("OpenRange16", false, barsAgoOpen, Opens[1][0],
0, Opens[1][0], Color.Cyan, DashStyle.Dash, 10);
}

Thanks

NinjaTrader_Josh
07-31-2010, 11:30 PM
RitaPacheco,

I am not sure your MRO check is actually valid. The check would likely need to be filtered into BarsInProgress == 0 as well.

RitaPacheco
08-01-2010, 12:07 PM
Thanks Josh

I get confused.

Since I put on Initialize()
Add(PeriodType.Range, 16);//This is 16 ticks Range Bars chart as secondary Time frame on Primery Chart (8 ticks)

BarsInProgress==1 (Is this the secondary Time frame bar on Primery Chart (8 ticks)?)

So everything that I want from CurrentBar of secondary time frame bar must start on primery at this bar (BarsInProgress==1) Does Ninja Trade knows where it is on Primery Chart?

Is BarsInProgress==0 the 1st bar on primery chart?

I don't know to express the DrawLine StartBar. I tried to do
barsAgoOpen = MRO(delegate{return Close [0] ==Opens[1][0];},1,CurrentBar);

Doesn't work. I tried 0 (zero) and BarsInProgress==1 doesn't work as well

if (BarsInProgress == 1)
DrawLine("OpenRange16", false, 0, Opens[1][0], 0,
Opens[1][0], Color.Cyan, DashStyle.Dash, 1);
}

Can you please help me on this, I already read
http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?MultiTimeFrameInstruments (http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?Overview18)
http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?CurrentBarSeries

Thanks

NinjaTrader_Josh
08-01-2010, 06:51 PM
Rita,

Sorry I am not sure what exactly you are asking. Every time your code enters OnBarUpdate() it is within the context of either BarsInProgress == 0 or BarsInProgress == 1. It will run through the code in OnBarUpdate() as either of them depending on which one has the event first (in most cases, BIP=0 will have the event first).

When you want to run logic with a mix of Opens[1][0] and compare it against Close[0] this means you need to actually filter your entire OnBarUpdate() to be within BIP0 because when you are in BIP0, Close[0] would be for BIP0. If you were in BIP1, Close[0] would be equivalent to Closes[1][0] and then the comparison becomes invalid.

RitaPacheco
08-06-2010, 10:16 AM
Thanks Josh

I don't need to compare them, I thought it was the way to find Bar Ago the Open bar from secondary chart start for primary chart knows where starts DrawLine, it was for Bar Start. If I put 0 (zero) it is CurrentBar on primary chart but not Open price on CurrentBar on Secondary Chart and I need this is a unique line during all CurrentBar from secondary chart on primary chart.

What I need to know is what I put on DrawLine's Bar Start argument to get the CurrentBar and Open value of the secondary chart. It doesn't work with BarsInProgress==1 that was what I wanted to say DrawLine start since Open[1][0] is known.

Thanks

NinjaTrader_Bertrand
08-06-2010, 10:59 AM
Rita, could you please share a code snippet of what you're currently trying to draw with the line? The added chart / timeframe would just be internally for calculations, so the visualization would still take place on the primary series where you start the indicator from.

RitaPacheco
09-03-2010, 07:16 AM
Hi

I used the script SampleMultiColoredPlot to do other for CCIMA MultiColoredPlot. I changed on the script SMA(period) by CCIMA(smaperiod,period) it works good unless if I put Calculate on bar close=false the actual bar doesn't felow the CCIMA, only actual bar the rest is ok.

Could you please tell me how do I fix it?

Thanks

NinjaTrader_Bertrand
09-03-2010, 07:44 AM
Rita, could you please post a screenshot of the outcome you see? I'm not aware of CalculateOnBarClose = false issues for the sample code you cited.

Thanks

RitaPacheco
09-03-2010, 01:32 PM
Thanks Bertrand

On last bar yellow line is normal CCIMA (we have CCIMA MultiColoredPlot over it in Blue and Orange) ; Blue line on last bar doesn't match CCIMA, it only match on bar close and next bar it happens the something.

NinjaTrader_Josh
09-03-2010, 02:55 PM
Please post the exact scripts in use. Thank you.

RitaPacheco
09-03-2010, 05:16 PM
Thanks Josh

Here you have the scripts CCIMA and CCIMAMultipleColoredPlot

NinjaTrader_Bertrand
09-04-2010, 01:40 AM
Rita, thanks for those - are working in our 6.5 release or 7 beta?

Thanks

RitaPacheco
09-04-2010, 02:04 AM
Thanks Bertrand

I'm working on 6.5

NinjaTrader_Bertrand
09-04-2010, 02:49 AM
Thanks Rita - I could reproduce this issue on 6.5 with your code, however it all worked as expected on our NT7 Beta 20, therefore I would suggest you start working in this environment if you need this working on CalculateOnBarClose = false.

RitaPacheco
09-04-2010, 03:18 AM
Thanks Bertrand

A time ago, I experimented a lot of problems importing my scripts to NT7 that I decided forget NT7, even script imported from the forum that says optimized to NT7 like for example CCI Forecast gave me errors on import. That put me too nervous.

By the way I adapted the script SampleMultiColoredPlot to others indicators all of them work good on Calculateonbarclose=false except CCIMA. (on NT6.5)

NinjaTrader_Bertrand
09-04-2010, 07:36 AM
I can understand Rita, here's what I would like you to try : in the CCIMA you call in your script, please do not set CalculateOnBarClose in the called script, please remove it completely and then retry.

RitaPacheco
09-04-2010, 09:42 AM
Thanks Bertrand

I think you didn't understand one thing the script that has problem is CCI MA MultiColoredPlot the CCIMA itself is ok the problem is the script to do CCMA with diferente colors for rise and fall. I already did a lot of indicator with dif colors for rise and fall witout any problem except with CCIMA I don't understand why this happen on CCI must have an explanation. It stay last bar the value is zero as you can see on screenshot until the bar close on bar close it assume the real value but new bar has the same problem again and so on

Any way I did what you asked and didn't fix it

NinjaTrader_Bertrand
09-04-2010, 02:29 PM
Thanks, I'll play with the code a bit more in 6.5 tomorrow and let you know if I spot anything related.