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.

# Easylanguage Error

## Recommended Posts

[LegacyColorValue = TRUE];

Poly Inner Channel.

This indicator plots a regression line and two standard deviation bands around it.

====================================== DECLARATIONS ==================================}

inputs:

Len (150),

RedLineLen(150),

Order (3),

SDev(.5),{why not make these inputs}

Price ©; {this cannot be a var, for some reason}

vars:

CURSOR (FALSE),

LASTBAR (TRUE),

sigma (0),

f (0),

Y(0),

b0 (0),

b1 (0),

b2 (0),

b3 (0),

b4 (0);

VARS:

JLAOK(TRUE),

JLAPASS1(0),

JLAPASS2(0),

JLAPASS3(0),

JLAPASS4(0),

JLAPASS5(0),

JLAPASS6(0);

{=========================================MAIN PROGRAM ===================================}

VALUE98=POLY_COEFFS(price,len,order,CURSOR,LASTBAR,b0,b1,b2,b3,b4);

value97=LinearRegValue( Price, RedLineLen, 0 );

if (lastbaronchart and lastbar) or (atcommentarybar and cursor) then

begin

sigma= stddev(price,len);

y=(len-1);

f=0;

while y>(-2)

begin

value5=( b0

+(b1 *f )

+(b2*(power(f, 2)))

+(b3*(power(f, 3)))

+(b4*(power(f, 4)))

);

plot1[y] (value5,"regression");

plot2[y] (value5 + (sdev * sigma ),"Channel+1");

plot3[y] (value5 - (sdev * sigma ),"LChannel -1");

plot4[y] (value97[y], "LR Momentum" );

y=y-1;

f=f+1;

end;

end;

{

commentarycl("b0 = ", b0);

commentarycl("b1 = ", b1);

commentarycl("b2 = ", b2);

commentarycl("b3 = ", b3);

commentarycl("b4 = ", b4);

}

it give me an error : trying to access future data.Bar reference value:-1

anybody can help me to solve this error?

thank you

USE CODE BOX

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

×

• 1
• 5
• 0
• 0
• 0
• ### Posts

• EUR/CHF IS IN AN UPTREND, MAY REACH LEVEL 1.0730 Key Resistance Levels: 1.0800, 1.0900, 1.1000 Key Support Levels: 1.0600, 1.0500, 1.0400 EUR/CHF Price Long-term Trend: Ranging EUR/CHF has been on a downward move since September 25. On October 15 downtrend; a retraced candle body tested 78.6 % Fibonacci retracement level. This indicates that the pair will fall and reach a low of 1.272 and later reverse. EUR/CHF – Daily Chart Daily Chart Indicators Reading: The pair is at level 41 of the Relative Strength Index period 14. It implies that the market is in a downtrend and below the centerline 50. The 50-day SMA and 21-day SMA are sloping horizontally. It indicates the sideways trend. EUR/CHF Medium-term Trend: Bullish On the 4-hour chart, the pair is also rising. On October 20, a retraced candle body tested 50 Fibonacci retracement level. This also indicates that the pair will rise and reach level 2.0 Fibonacci extension. That is the low level of 1.0730. EUR/CHF – 30 Min Chart 4  Hour Chart Indicator Reading The 50-day and 21-day SMAs are sloping sideways indicating the previous trend. The pair is below the 30% range of the daily stochastic. It indicates that the market is in a bearish momentum. General Outlook for EUR/CHF EUR/CHF is rising after breaking the initial resistance. The price rebounded at level 1.0714 to resume the upward move. According to the Fibonacci tool, the market will reach level of 1.0730.   Source: https://learn2.trade
• EURUSD RISKS DEEPER DECLINE AT 1.1800 LEVEL ON SURGE IN EUROPE COVID-19 CASES EURUSD Price Analysis – October 26 Growing fears of a surge in Europe Covid-19 cases may slowdown economic recovery as new infections trigger stricter measures and prompt investors into safety. EURUSD risks a deeper decline at the 1.1800 level as buyers repeatedly failed to make a sustained break above the daily cloud top around the 1.1850 level. Key Levels Resistance Levels: 1.2150, 1.2011, 1.1917 Support Levels: 1.1807, 1.1612, 1.1422 EURUSD Long-term Trend: Ranging EURUSD is under pressure, trading near the 1.1810 level, and is in danger of further falling. The EURUSD rally appears to have hit a decent barrier at recent highs around 1.1880. A break of this area is expected to push the pair higher towards the 1.1917 area as the bullish trend is expected to resume at the key level. In a broader context, the rise from 1.0635 is seen as the third phase of the pattern from 1.0339 (low). A further rally towards the cluster resistance at 1.2011 can be seen. This will remain a preferable case as long as the resistance at 1.1422 is held and turned into support. EURUSD Short-term Trend: Ranging EURUSD intraday trend stays neutral as consolidation from 1.1880 regions continues. Nevertheless, further growth stays in favor while maintaining the support level of 1.1685. The break into 1.1880 regions will be a test at the 1.2011 high. The 4 hours chart shows that the pair is developing below the moderately bearish 5 and 13 moving averages. A move below 1.1800 is needed to mark an immediate (minor) high for a pullback to the bottom of the short-term channel seen at 1.1725. On the other hand, a breakout of 1.1685 is likely to extend the corrective pattern from 1.2011 by one more phase. Intraday bias will return to the downside towards 1.1612 and below. Source: https://learn2.trade