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.

magiclaas

Easy Language Error

Recommended Posts

hi,

i ve this script:

 

[LegacyColorValue = TRUE];

 

{ ======================================= HEADER ====================================

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);

}

 

.... but plotting it in multicharts i recive this popup:

 

Messagge:Error in study "SIGMA INNER CHANNEL

trying to access future data. Bar reference value:-1.

 

CAN PLEASE ANYBODY HELP ME TO CORRECT THE SCRIPT?

 

thank you very much

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.


  • Topics

  • Posts

    • Date: 6th January 2025.   The NASDAQ Rebounds As Investors Get Ready For Earnings Season!   The NASDAQ jumped more than 1.65% on Friday after 5 days of consecutive declines. The decline was primarily due to investors opting to take advantage of the discounted price ahead of this week’s earnings season. Earnings season is due to start this Friday with the banking sector. However, is there still downside risk to the NASDAQ’s bullish trend?     NASDAQ - Bullish Signals With The Risk of Corrections! Due to the NASDAQ’s considerable rise on Friday, the index is obtaining bullish signals from technical indicators and price action, although other factors continue to signal risk of a potential further downslide. With inflation on the rise again and economic data beating expectations, the hawkishness of the Federal Reserve is likely to remain. On Thursday and Friday, the US Final Manufacturing PMI, ISM PMI and ISM Manufacturing Prices all rose above expectations. The ISM Manufacturing PMI rose from 48.4 to 49.3 and the Manufacturing Prices Index from 50.3 to 52.5. Friday’s strong economic data did trigger a 40-minute decline, but the bullish trend continued thereafter. Nonetheless, the positive economic data adds to the Federal Reserve’s current bullish tone. A hawkish Fed in the long-term can dim upward price movement or even trigger a larger correction. In addition to this, President-elect Trump will take office on January 20th and most political experts predict his administration will pursue tariffs on imports. Previously, this triggered a lower sentiment towards the stock market and a strong US Dollar. The US Dollar over the past 2 months has appreciated by almost 5.00%, but stocks have yet to experience a significant, lasting decline. A strong factor for the performance in January and February will be earnings season. Traders will be monitoring whether institutions increase their exposure to the NASDAQ as earnings season approaches. However, the market’s decision will also depend on the upcoming employment data. The US is set to release its JOLTS Job Vacancies tomorrow, ADP Employment Change on Wednesday, NFP Employment Change and Unemployment Rate on Friday. Analysts expect the US Unemployment Rate to remain at 4.2%. If the employment data reads higher than expectations, investors may adopt a more hawkish stance on monetary policy. As a result, the positive data could have a negative short-term effect on the NASDAQ. European stocks trade higher as the European Market opens, while Asian stocks decline. However, both the VIX Index and US bond Yields trade higher. If the VIX and Bond Yields continue to rise, traders may become cautious of further speculating the impulse wave in the short term. NASDAQ - Earnings Season As mentioned above, earnings season will start on NFP Friday (Friday 10th), but none of the NASDAQ components will be included. Nonetheless, the quarterly earnings reports on Friday will provide either a stronger or weaker sentiment towards the US stock market and therefore will have a ripple effect on the technology sector. The first NASDAQ companies which analysts will be following are Netflix and Tesla. Analysts expect revenue for Netflix to increase above $10 billion, but for their earnings per share to fall from $5.40 to $4.22. However, for Tesla, analysts expect both revenue and earnings per share to increase, despite the company failing to meet its delivery targets. Over the past 12 months, Tesla has risen by 70% and Netflix by 82%. NASDAQ - Technical Analysis The price of the NASDAQ is trading above the 75-bar EMA and attempting to cross above the 100-bar SMA. On the 2-hour chart, the index is also trading in the buy zone of most oscillators. The NASDAQ also starts this week with a bullish price gap measuring 0.23%. Currently, the price movement indicates investors are increasing exposure as we approach the start of earnings season. However, this will also depend on the employment data throughout the week.         Key Takeaways: Price movement indicates investors are increasing their exposure to the NASDAQ as earnings season approaches. Key risks remain if employment data beat expectations, which could likely trigger a prolonged hawkish stance from the Federal Reserve. The performance of the stock market will also depend on the potential for upcoming trade wars. Donald Trump is set to take office on January 20th. The price of the NASDAQ is trading above the 75-bar EMA and attempting to cross above the 100-bar SMA. Today’s trading starts with a bullish price gap. Always trade with strict risk management. Your capital is the single most important aspect of your trading business.   Please note that times displayed based on local time zone and are from time of writing this report.   Click HERE to access the full HFM Economic calendar.   Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding of how markets work. Click HERE to register for FREE!   Click HERE to READ more Market news. Michalis Efthymiou HFMarkets Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in Leveraged Products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • IDCC Interdigital stock nice breakout at https://stockconsultant.com/?IDCC
    • OSCR Oscar Health stock, nice move higher off the 13.55 support area at https://stockconsultant.com/?OSCR
    • REVG REV Group stock, great day off the 31.79 support area, from Stocks to Watch at https://stockconsultant.com/?REVG
    • RL Ralph Lauren stock, watch for a narrow range breakout at https://stockconsultant.com/?RL
×
×
  • Create New...

Important Information

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