NexusFi: Find Your Edge


Home Menu

 





"Wrong Expression"


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
 deltastrike 
California
 
Experience: Intermediate
Platform: Multicharts
Trading: Futures
Posts: 6 since Mar 2012
Thanks Given: 5
Thanks Received: 0

Hello master EL programmers...I've been dove into EL head first without a programming background and I'm trying to troubleshoot this code that I came across for a simple pattern signal. When I attempt to compile it it give me an error saying "wrong expression" and highlights the first "NumericSimple" input argument. I have no idea why this is wrong, it even looks identical to the example provided in the editor dictionary.

{#function C_3WhSolds_3BlkCrows}

Inputs:
Length(NumericSimple),
Percent(NumericSimple),
o3WhiteSoldiers( numericref ),
o3BlackCrows( numericref ) ;

variables:
BodyHi( 0 ),
BodyLo( 0 ),
Body( 0 ),
BodyAvg( 0 ),
UpShadow( 0 ),
DnShadow( 0 ),
MyRange( 0 ),
Factor( Percent * .01 ) ;

BodyHi = MaxList( Close, Open ) ;
BodyLo = MinList( Close, Open ) ;
Body = BodyHi - BodyLo ;
BodyAvg = XAverage( Body, Length ) ;
UpShadow = High - BodyHi ;
DnShadow = BodyLo - Low ;
MyRange = High - Low ;

o3WhiteSoldiers = 0 ;
o3BlackCrows = 0 ;

if CurrentBar > 2
and Body > BodyAvg
and Body[1] > BodyAvg[1]
and Body[2] > BodyAvg[2]
{ THREE CONSECUTIVE LONG BODIES }
then
begin
if Close > Open
and Close[1] > Open[1]
and Close[2] > Open[2]
{ ALL THREE BODIES WHITE... }
and Close > Close[1]
and Close[1] > Close[2]
{ ...EACH WITH A HIGHER CLOSE }
and Open < Close[1] and Open > Open[1]
and Open[1] < Close[2] and Open[1] > Open[2]
{ EACH OPEN WITHIN PREVIOUS BODY... }
and UpShadow / MyRange < Factor
and UpShadow[1] / MyRange[1] < Factor
and UpShadow[2] / MyRange[2] < Factor
{ ...AND EACH CLOSE NEAR HIGH }
then
o3WhiteSoldiers = 1
else if Close < Open
and Close[1] < Open[1]
and Close[2] < Open[2]
{ ALL THREE BODIES BLACK... }
and Close < Close[1]
and Close[1] < Close[2]
{ ...EACH WITH A LOWER CLOSE }
and Open > Close[1] and Open < Open[1]
and Open[1] > Close[2] and Open[1] < Open[2]
{ EACH OPEN WITHIN PREVIOUS BODY... }
and DnShadow / MyRange < Factor
and DnShadow[1] / MyRange[1] < Factor
and DnShadow[2] / MyRange[2] < Factor
{ ...AND EACH CLOSE NEAR LOW }
then
o3BlackCrows = 1 ;
end ;


Any help would be appreciated!


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
June 15 Peace Odds Surge From 3.6% to 12.25% After Trump …
Prediction Markets & Event Contracts
Fabrication or Framework? Irans Denied MOU Explains the …
Prediction Markets & Event Contracts
Beijing Summit Closes: Xi Pledges Hormuz Help -- $1.14B …
Prediction Markets & Event Contracts
CFTC Approves First US Bitcoin Perpetual Futures -- Kals …
Traders Hideout
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks
  #3 (permalink)
 
Hulk's Avatar
 Hulk 
Texas, USA
 
Experience: Advanced
Platform: TT, Custom
Trading: Futures, Spreads
Posts: 399 since May 2014
Thanks Given: 758
Thanks Received: 952



deltastrike View Post
Hello master EL programmers...I've been dove into EL head first without a programming background and I'm trying to troubleshoot this code that I came across for a simple pattern signal. When I attempt to compile it it give me an error saying "wrong expression" and highlights the first "NumericSimple" input argument. I have no idea why this is wrong, it even looks identical to the example provided in the editor dictionary.

...

Any help would be appreciated!

Just taking a shot here... Did you copy and paste this to create a new "Indicator" or a new "Function"? I am willing to bet that you mistakenly created an indicator instead of a function. The input types NumericSimple, NumericSeries etc are reserved words for functions and will fail to compile when used in anything other than a function.


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 deltastrike 
California
 
Experience: Intermediate
Platform: Multicharts
Trading: Futures
Posts: 6 since Mar 2012
Thanks Given: 5
Thanks Received: 0


Hulk View Post
Just taking a shot here... Did you copy and paste this to create a new "Indicator" or a new "Function"? I am willing to bet that you mistakenly created an indicator instead of a function. The input types NumericSimple, NumericSeries etc are reserved words for functions and will fail to compile when used in anything other than a function.

Thanks!


Started this thread Reply With Quote




Last Updated on March 4, 2015


© 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