NexusFi: Find Your Edge


Home Menu

 





easylanguage syntax error


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,266 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

easylanguage syntax error

  #1 (permalink)
magiclaas
Italia
 
Posts: 1 since Oct 2013
Thanks Given: 0
Thanks Received: 0

hi,
i got this easylenguage code:



[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 (c); {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);
}


plotting it in Multicharts 10.0 i recive this Message: Error in study....
... trying to acces future data.Bar reference value: -1.

Can anybody tell me where is the problem in this code and give me a solution?
i use it on metastock historical data

thank you very much

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
Footprint for strategy Builder
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
68 thanks
Spoo-nalysis ES e-mini futures S&P 500
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
The Trading Pit "Futures VIP" Account Journal
15 thanks
Trading with Intuition
15 thanks




Last Updated on April 16, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts