cryptolinx

[CLX] Library Motion - Examples

📑 Showcase

This is ready-to-show indicator version of the example code form the `motion` library. It can be used to create string- or color-based effects.

Library:
================================================================================

📑 Setup

To use this library in your own scripts, you must first import it. To do this, add the following line to the top of your script:

import cryptolinx/Motion/1 as motion

Next, create a `keyframe` object by using the `varip` keyword.

varip myKeyframe = motion.keyframe.new(_intv = 1, _steps = 1)

Based on your needs, you can now use one of the simplified functions to create a transition effect, or you can use the `transition()` or `iteration()` function to create a custom transition effect.

📑 Simplified Functions:

(direct output)

// motion.marquee(keyframe myKeyframe, string _seq, int _ws, int _maxLoops, bool _ltr)
motion.marquee(myKeyframe, 'Hello World!', 3, 0) // 0 = infinite loops

// motion.slideInLeft(keyframe myKeyframe, string _seq, int _ws, int _maxLoops, bool _refill)
motion.slideInLeft(myKeyframe, 'Hello World!', 3, 0) // 0 = infinite loops

// motion.slideOutLeft(keyframe myKeyframe, string _seq, int _ws, int _maxLoops, bool _refill)
motion.slideOutLeft(myKeyframe, 'Hello World!', 3, 0) // 0 = infinite loops

// motion.slideInRight(keyframe myKeyframe, string _seq, int _ws, int _maxLoops, bool _refill)
motion.slideInRight(myKeyframe, 'Hello World!', 3, 0) // 0 = infinite loops

// motion.slideOutRight(keyframe myKeyframe, string _seq, int _ws, int _maxLoops, bool _refill)
motion.slideOutRight(myKeyframe, 'Hello World!', 3, 0) // 0 = infinite loops

// motion.blink(keyframe myKeyframe, string _seq, int _ws, int _maxLoops)
motion.blink(myKeyframe, 'Hello World!', 3, 0) // 0 = infinite loops

(indirect output)

// After you create a transition, you can use the `output` field of the `keyframe` object to get the result.
// motion.marquee(myKeyframe, 'Hello World!', 3, 0)
myKeyframe.output
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?