OmniTrader Professional Forum
-
OmniScripts
Coral Trend |
^ Top | ||
THOMAS HELGET![]() Posts: 610 Joined: 3/22/2006 Location: BALDWINSVILLE, NEW YORK ![]() | 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 ![]() | |
^ Top | ||
wolf![]() Posts: 135 Joined: 4/21/2011 Location: Germany ![]() | 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 ![]() | 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 ![]() | 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 ![]() | |
^ Top | ||
THOMAS HELGET![]() Posts: 610 Joined: 3/22/2006 Location: BALDWINSVILLE, NEW YORK ![]() | 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 ![]() | 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 ![]() | |
^ Top | ||
wolf![]() Posts: 135 Joined: 4/21/2011 Location: Germany ![]() | Tom Thank you for your help Regards Wolfgang |