OmniTrader Professional Forum - OmniScripts
Coral Trend

^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : Coral Trend
Posted : 12/26/2021 1:39 PM
Post #31758

Fellow coders:

I was fascinated by the new Coral Trend Indicator offered in OmniTrader 2022 and sought out the base code on the internet to try to better appreciate what it was actually doing.

I am happy to say that I have been able to duplicate the OT 2022 Indicator but also sorry to say that I haven't the feintest idea what the code is doing.

I have attached it here since it isn't currently available for VisualTrader 12.5 nor older versions of OmniTrader or VisualTrader.

Happy Holidays,

tom Helget
Attached file : indCoralTrend.txt (1KB - 387 downloads)

^ Top
wolf

Posts: 135

Joined: 4/21/2011
Location: Germany

User Profile
 
Subject : RE: Coral Trend
Posted : 12/28/2021 12:44 AM
Post #31764 - In reply to #31758

Hello Tom,
thank you for sharing the OL coding for this nice indicator.
Regards
Wolfgang

P.S Is there someone, who could provide a strategy, which will fire a signal once the colours of the corel indicator are changing from red to green and vice a verse. So the efficiency of corel indicator could be compared with the other OT trend indicators.
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Coral Trend
Posted : 12/28/2021 6:39 AM
Post #31765 - In reply to #31764

Wolf:

I don't have the original Indicator on front of me and forgot the exact syntax of my coding but:

If (CoralTrend(14, 0.4) > CoralTrend(14, 0.4)[1]) AND (CoralTrend(14, 0.4)[1] < CoralTrend(14, 0.4)[2]) Then
Signal = LongSignal (or ExitSignal)

Just revese it for a Short Signal.

Tom Helget



^ Top
wolf

Posts: 135

Joined: 4/21/2011
Location: Germany

User Profile
 
Subject : RE: Coral Trend
Posted : 1/2/2022 3:22 AM
Post #31772 - In reply to #31765

Hello Tom,
first happy year 2022.
Thank you for your feedback reflecting the "sys Corel" coding. Once I compiled it, the OL compiler was asking for an end if phrase. I entered "end if" phrase and further error came up. Something seams to be wrong I have made. For further details I have attached the coding which I tried to fix however with no success.
Regards
Wolfgang

Error message
oCORALTREND_4 = CoralTrend(14, 0.4)
~~~~~~~~~~
Compiler return value: 1
Attached file : sysCorelTrend.txt (0KB - 299 downloads)

^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Coral Trend
Posted : 1/2/2022 7:33 AM
Post #31773 - In reply to #31772

wolf:

The code I gave you assumed that you could write up a System - sorry!

I am working on something for the Coral Trend at the moment and if anything comes of it I will post it here - but it will take a while.

So, please be patient.

Happy New Year!

Tom Helget
^ Top
THOMAS HELGET

Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: Coral Trend
Posted : 1/2/2022 8:26 AM
Post #31778 - In reply to #31773

wolf:

Attached is a System for Coral Trend that uses OmniTrader's coding.

To use the Indicator I have already provided substitute the line in the code that reads

CT = CoralTrend(Smoothing_Periods, Constant_D) with
CT = indCoralTrend(Smoothing_Periods, Constant_D).

You will still have to make a Strategy, however, using this System.

Tom Helget
Attached file : sysCoralTrend.txt (0KB - 353 downloads)

^ Top
wolf

Posts: 135

Joined: 4/21/2011
Location: Germany

User Profile
 
Subject : RE: Coral Trend
Posted : 1/7/2022 4:00 AM
Post #31813 - In reply to #31758

Tom
Thank you for your help
Regards
Wolfgang


https://www.omnitrader.com/currentclients/proforum/thread-view.asp?threadid=7991&posts=7