OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniLanguage Discussion
Why wont this compile?
Last Activity 8/30/2020 10:51 AM
7 replies, 156 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
Diamondjag

Legend
1001001002525
Posts: 370

Joined: 3/12/2006
Location: Brighton, Colorado

User Profile
 
Subject : Why wont this compile?
Posted : 8/29/2020 5:30 PM
Post #31220

Seems so simple. Why won't this compile?

#System

If Coppock(14,11,10) > Coppock(14,11,10)[1] and _

Coppock(14,11,10)[1] < 0 then

Signal=LongSignal

End If


Keeps giving me this error:

FileName: CoppockSystem.txt; Line: 3; Syntax error, missing operand.
^ Top
Jim Dean

Sage
20001000100100100
Posts: 3309

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Why wont this compile?
Posted : 8/29/2020 6:15 PM
Post #31221 - In reply to #31220

Type in the function name followed by just one open paren, on a blank line. Help Popup hopefully will explain expected parameters.
^ Top
Diamondjag

Legend
1001001002525
Posts: 370

Joined: 3/12/2006
Location: Brighton, Colorado

User Profile
 
Subject : RE: Why wont this compile?
Posted : 8/29/2020 7:57 PM
Post #31222 - In reply to #31221

Sorry Jim, I still don't get it. Also looked at "Help". Here's what I understood you to say: "Type in the function name followed by just one open paren, on a blank line."

#System

Coppock(

If Coppock(14,11,10) > Coppock(14,11,10)[1] and _

Coppock(14,11,10)[1] < 0 then

Signal=LongSignal

End If



I look at another system and it works fine. I don't really see the difference in this format and the Coppock system other than this has a short signal.

#System

If STO(8,3,3)[1] < 20 and STO(8,3,3) > 20 then
Signal=LongSignal

ElseIf STO(8,3,3)[1] > 80 and STO(8,3,3) < 80 then
Signal=ShortSignal

End If



^ Top
Greg

Legend
100100100
Posts: 310

Joined: 3/22/2006
Location: Mishawaka, IN 46544

User Profile
 
Subject : RE: Why wont this compile?
Posted : 8/29/2020 8:55 PM
Post #31223 - In reply to #31220

Thread from 2006 may or may not help.

https://www.omnitrader.com/currentclients/proforum/thread-view.asp?threadid=1795
^ Top
Jim Dean

Sage
20001000100100100
Posts: 3309

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Why wont this compile?
Posted : 8/29/2020 8:56 PM
Post #31224 - In reply to #31222

Heh heh. My bad. I should have said:
“While in the OLang Editor window, type …”
The editor has a popup that appears at that point that tells you the expected parameter list.
It looked to me from the error message that the number of params (or maaaybe their values) wasn’t matching what the compiler expected.
If that Help message doesn’t clear it up, you’ll need to contact N for more complete info on that Indicator (which I don’t know anything about).
If otoh the Coppock indicator is NOT a N-supplied function then ignore everything that I said, and look up the indicator’s code (presumably if not N it’s in OLang).
Hope that helps.
Somehow.

[Edited by Jim Dean on 8/29/2020 8:58 PM]

^ Top
Jim Dean

Sage
20001000100100100
Posts: 3309

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Why wont this compile?
Posted : 8/30/2020 5:23 AM
Post #31225 - In reply to #31223

I just noticed the link that Greg posted. Apparently the Coppock indicator, at least in 2008, was *not* supplied by Nirvana (maybe it is today tho - so many plugins that I have lost track).

Here is the code for the indicator, as provided on that thread … I removed a few unnecessary paren’s and added CIW to the Return. I don’t know anything about the indicator itself - the 11 and 14 seem a bit odd and arbitrary but hey, maybe they are magic:

#Indicator

Dim CI, CIW as Single

CI = 100*((C-C[11])/C[11] + (C - C[14])/C[14]) / 2
CIW = WMA(CI, 10)

Plot("CIW", CIW)

Return CIW

Note that there are NO parameters defined … so the correct function call for that would be “Coppock()” … presuming the indicator was named Coppock.txt

[Edited by Jim Dean on 8/30/2020 5:24 AM]

^ Top
Jim Dean

Sage
20001000100100100
Posts: 3309

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Why wont this compile?
Posted : 8/30/2020 5:33 AM
Post #31226 - In reply to #31225

Using the original post In this thread as a clue, here is a version that uses the three param’s in the order originally used (14,11,10). I added flow control statements to assure correct results on the early bars, and included tests to avoid division by zero.

#Indicator ‘ named Coppock.txt and stored in VBA/Indicators folder

#param “LongAgo”, 14
#param “ShortAgo”, 11
#param “WmaPds”, 10

Dim CI, CIW as Single

If bar >= LongAgo AndAlso C[ShortAgo]*C[LongAgo] <> 0 then

CI = 100*((C-C[ShortAgo)/C[ShortAgo] + (C - C[LongAgo])/C[LongAgo]) / 2

If bar >= LongAgo+WmaPds then
CIW = WMA(CI, WmaPds)

Plot("CIW", CIW)

End if
End if

Return CIW

[Edited by Jim Dean on 8/30/2020 5:36 AM]

^ Top
Diamondjag

Legend
1001001002525
Posts: 370

Joined: 3/12/2006
Location: Brighton, Colorado

User Profile
 
Subject : RE: Why wont this compile?
Posted : 8/30/2020 10:51 AM
Post #31227 - In reply to #31226

I had an old article on the Poppock indicator and thought I would give it a look. I thought I had seen it somewhere from Nirvana and went searching the indicators. It is, indeed, part of the Ultimate Indicator Suite.

I looked at it on a monthly time frame as the article suggested and wasn't too impressed but as I lowered the timeframe (down to daily) the more interesting it became.

Thanks for the reply's. Jim, I'll work on what you sent. Appreciate the replies.
Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.