Have a few questions pertaining to RTL coding.

Login or Register

Please login or register in order to view and post in the Forum.

1 post / 0 new
dmavro
Last seen: 1 month 2 days ago
Joined: 01/12/2023 - 19:41
Have a few questions pertaining to RTL coding.

Ive been trying to make a group of indicators i wrote more efficient because im getting lag in system during day and some warnings in the log when the indicators run at the end of each bar. Ive noticed that i could have written a whole bunch of the Signals that are needed differently. For example, Im using SSTAT's of 2 signals in another Signal something like this...
(SSTAT_SigABars = 1) OR (SSTAT_SigBBars = 1)
I now realize i could have just done this...
(SIGNAL_A = 0 AND SIGNAL_A.1 != 0) OR (SIGNAL_B = 0 AND SIGNAL_B.1 != 0)
1. Does it make more sense to call the Signal 1 bar back instead of using 2 SSTAT's in the RTL formula like ive been doing? Dont really understand the inner workings of RTL so figured Id ask.

Also, the result of these is the same...
Sig_A !=0 , Sig_A > 0
2. but is one better to use over the other?

I know in some programming languages that multiplication is faster than division.
3. Is it better to use (X+Y)*.5 instead of (X+Y)/2 in RTL?
4. What about in RTX development?

One last thing, The group of custom indicators this all pertains too mostly use a particular CI in there RTL formulas as do most of the signals. Im not happy with the structure of everything because it seems very sloppy. For instance, there are a few CI's that all use the same Signals and the Main CI in there RTL code. The Signals being used in those formulas also use the Main CI and different Signals. Some of those signals also use the Main CI. This all seems very redundant to me.
5. Im wondering if this entire project is better suited as an RTX project?

Thanks,
Dean

0