I have an indicator that is only displaying about 25 days back. I have 60 days back data loaded, and none of the things that I have prohibit the indicator from displaying. When I print out the bar numbers, they appear to be wrong too.
If I put on a simple indicator (like a pivot) it displays the entire data set.
Is there some setting that I need to change to increase the memory or something since I moved to MC64? The longest look back is less than 50 bars, and I don't think that is the issue.
MC 64 Indicator [SOLVED]
-
- Posts: 51
- Joined: 24 Feb 2011
- Location: Atlanta, GA
- Has thanked: 5 times
- Been thanked: 8 times
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: MC 64 Indicator
Look up the keyword MaxBarsBack and articles on Max Bars Back.I have an indicator that is only displaying about 25 days back. I have 60 days back data loaded, and none of the things that I have prohibit the indicator from displaying. When I print out the bar numbers, they appear to be wrong too.
If I put on a simple indicator (like a pivot) it displays the entire data set.
Is there some setting that I need to change to increase the memory or something since I moved to MC64? The longest look back is less than 50 bars, and I don't think that is the issue.
https://www.multicharts.com/trading-software/
-
- Posts: 51
- Joined: 24 Feb 2011
- Location: Atlanta, GA
- Has thanked: 5 times
- Been thanked: 8 times
Re: MC 64 Indicator
In my original entry, I said that I had already check max bars back. I had already read the reference material, and the my longest indicator is less that 50 bars back (It is user defined). Unless I don't understand it, Max bars back should not be the reason for two full months of data not to display.
My charts are small increments (2, 3 or minute)
Is there anything else that can cause this?
My charts are small increments (2, 3 or minute)
Is there anything else that can cause this?
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: MC 64 Indicator
You did not say those were minute charts.In my original entry, I said that I had already check max bars back. I had already read the reference material, and the my longest indicator is less that 50 bars back (It is user defined). Unless I don't understand it, Max bars back should not be the reason for two full months of data not to display.
My charts are small increments (2, 3 or minute)
Is there anything else that can cause this?
If the problem is across all indicators, then problem is in a MultiCharts setting.
If the problem is limited to one indicator, then problem is due to that indicator.
Please give more info on the indicator and symbol.
-
- Posts: 51
- Joined: 24 Feb 2011
- Location: Atlanta, GA
- Has thanked: 5 times
- Been thanked: 8 times
Re: MC 64 Indicator
I'm using the EurUSD on a 3 minute chart. I think that the issue is that the barnumber is also really, really off. I ran this code and I got Two different barnumbers for the same time and neither coincides with the chart. I closed and reopened everything, and this is the only chart and workspace open.
Output
Code: Select all
If Time = 1030 then Begin
Print("Date", Date, "Time", Time, "Barnumber", Barnumber);
End;
Code: Select all
Date1100727.00Time1030.00Barnumber 76.00
Date1100728.00Time1030.00Barnumber 336.00
Date1100728.00Time1030.00Barnumber 116.00
Date1100729.00Time1030.00Barnumber 240.00
Date1100730.00Time1030.00Barnumber 720.00
Date1100730.00Time1030.00Barnumber 144.00
-
- Posts: 51
- Joined: 24 Feb 2011
- Location: Atlanta, GA
- Has thanked: 5 times
- Been thanked: 8 times
Re: MC 64 Indicator
Ok, here is another test I ran to try to figure it out. Both currentbar and barnumber are offset by six bars. I don't care about the offset, but the issue is that the barnumbers on the chart are offset by six bars.
Here is the complete code with no indicators. I ran it on a 3 minute chart.
Result
You can see in the image that the chart has the bar at 21.00 as barnumber 7.
Here is the complete code with no indicators. I ran it on a 3 minute chart.
Code: Select all
If date = 1100727 then Begin
Print("Date", Date, "Time", Time, "Currentbar", currentbar, "Barnumber", Barnumber);
End;
Code: Select all
Date1100727.00Time 21.00Currentbar 1.00Barnumber 1.00
Date1100727.00Time 24.00Currentbar 2.00Barnumber 2.00
Date1100727.00Time 27.00Currentbar 3.00Barnumber 3.00
Date1100727.00Time 30.00Currentbar 4.00Barnumber 4.00
Date1100727.00Time 33.00Currentbar 5.00Barnumber 5.00
Date1100727.00Time 36.00Currentbar 6.00Barnumber 6.00
Date1100727.00Time 39.00Currentbar 7.00Barnumber 7.00
Date1100727.00Time 42.00Currentbar 8.00Barnumber 8.00
- Attachments
-
- Barnumber_Example.jpg
- (255.15 KiB) Downloaded 698 times
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: MC 64 Indicator [SOLVED]
Hello,
BarNumber doesn't take into account the MaxBarsBack value. You should use "MaxBarsBack+CurrentBar". By the way here is a good example of prints:
BarNumber doesn't take into account the MaxBarsBack value. You should use "MaxBarsBack+CurrentBar". By the way here is a good example of prints:
Code: Select all
Var: Scale(0);
Condition1 = close > close[1];
If MinMove < 10 then
Scale = 1;
If MinMove > 99 and MinMove > 1000 then
Scale = 2;
If MinMove > 999 and MinMove > 10000 then
Scale = 3;
If MinMove > 9999 and MinMove > 100000 then
Scale = 4;
If MinMove > 99999 and MinMove > 1000000 then
Scale = 5;
If Condition1 = true then begin
print( "======================", NewLine,
"The date is ", DateToString(DateToJulian(Date)), ",", NewLine,
"time is ", TimeToString(ELTimeToDateTime(Time)), ",", NewLine,
"bar # is ", maxbarsback+currentbar, ",", NewLine,
"current bar open is ", open, ",", NewLine,
"current bar high is ", high, ",", NewLine,
"current bar low is ", low, ",", NewLine,
"current bar close is ", close, ",", NewLine,
"market position on chart is", MarketPosition, ",", NewLine,
"market position at broker is", MarketPosition_at_Broker, ",", NewLine,
"Condition1 is true, so at close of this bar the limit order to buy at ", NumToStr(close,scale), " is generated by the script", NewLine,
"to be executed at bar # ", maxbarsback+currentbar+1);
Buy next bar at close limit;
end else begin
print( "======================", NewLine,
"The date is ", DateToString(DateToJulian(Date)), ",", NewLine,
"time is ", TimeToString(ELTimeToDateTime(Time)), ",", NewLine,
"bar # is ", maxbarsback+currentbar, ",", NewLine,
"current bar open is ", open, ",", NewLine,
"current bar high is ", high, ",", NewLine,
"current bar low is ", low, ",", NewLine,
"current bar close is ", close, ",", NewLine,
"market position on chart is", MarketPosition, ",", NewLine,
"market position at broker is", MarketPosition_at_Broker, ",", NewLine,
"Condition1 is false, so no order is generated.");
end;
-
- Posts: 51
- Joined: 24 Feb 2011
- Location: Atlanta, GA
- Has thanked: 5 times
- Been thanked: 8 times
Re: MC 64 Indicator
Thanks. The support chat helped too. I found the problem, but it still bothers me that I didn't get the error even though my maxbarsback was greater than the user defined 50. I guess its in the nuance of how it works.
Marc
Marc