NexusFi: Find Your Edge


Home Menu

 





easylanguage syntax error


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #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?
April Jobs Beat Flips Fed Hike Odds Past 52% for First T …
Traders Hideout
Post-Summit Scorecard: $36M in May 15 Bets Settle Near-Z …
Prediction Markets & Event Contracts
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
CME Group CEO Calls CFTC-Approved Crypto Perps Dangerous …
Traders Hideout
UCL Final Kicks Off at Noon ET: PSG at 56.5% as Iran May …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks




Last Updated on April 16, 2017


© 2026 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 - Downloads - Top
no new posts