Home › Forums › Trading System Mentor Course Community › Real Test Software › Introduction
- This topic is empty.
-
AuthorPosts
-
December 8, 2020 at 11:56 pm #112656TrentRothallParticipant
Flick me an email if you like Seth, [email protected]
Julian and i seem to have things ‘under control’
December 16, 2020 at 4:17 pm #112292AnonymousInactiveHey everyone – I wanted to leave this here in case it helps someone in the future. I had a moment of epiphany earlier while I had four script windows open and was trying to interpret what was going on (PUN INTENDED).
Amibroker .afl code is interpreted, that is, it runs top to bottom. You can not reference code in the future. If you have BuySetup = GOGOGO, then you must have defined GOGOGO in a prior line to your BuySetup.
RT code is compiled, that is, it runs in it’s own little environment. It does not run top to bottom for each symbol, and it does not need to be coded in the same way that we code .afl files. [strike]You can have BuySetup = GOGOGO somewhere and you can have GOGOGO defined somewhere after your BuySetup line.[/strike] SEE TRENT’S POST BELOW
** This only works with the variables themselves, it seems. You can’t a have a “Template: base” at the end of a file and a Strategy that is “Using: base” at the top, since “base” is not a variable.I am attempting to code relatively similar to Amibroker (to help my brain), but as I looked at example scripts and read Marsten’s manual, I was having trouble until I wrapped my head around the compiling. Many of his sample .rts files have an “Include” statement where he refers to some other file. If you have a few windows open and have gone through his tutorials are are struggling to understand how he is running scripts with minimal information in them, then this may help you.
December 16, 2020 at 4:24 pm #112682AnonymousInactiveRegarding my post above and more on compiling:
Trent, the way you have coded your statement in the example file (thank you by the way, super helpful):Conditions: Uptrend and RSIx and Liquid and InRUI
I believe we can do a better job here, since the formulas themselves are evaluated from left to right for each symbol.
With InRUI last, RT is going to do the math for Uptrend first, and if it is true then math for RSIx, and if it is true then math for Liquid, and if it is true then the boolean for InRUI.If you want to code this for maximum speed (minimal computation), then you should code it as follows:
Conditions: InRUI and Liquid and Uptrend and RSIx
{those last two could probably be interchanged}If InRUI, which is just a boolean, is false, nothing else is evaluated. If Liquid is false, then it does not compute Uptrend.
Hope that helps someone. More info is here: https://mhptrading.com/realtest/docs/topics/idh-topic1180.htm
December 17, 2020 at 12:27 am #112683TrentRothallParticipantYeah, you’re right Seth. I haven’t looked at those templates for a while and they would most likely be out of date. RT has progressed ALOT since i posted them.
Also emponential functions such as EMA, ATR etc should be on their own data line. It makes it faster apparently, i don’t really understand the technical reason why.
ie.EMA1: EMA(C, 5)
EMACond: c > EMA1as opposed to
EMAcond: C > EMA(c,5)
In regards to the order of variables.
In the data section everything must be written in the correct order as in amibroker. Other wise your fist test/run will have erroneous values. Once the first run is done the calculated data values are stored in memory for fast access. so in the statement
Cond1: Cond2
Cond2: 1 < 2 this will throw a error msg. The error message never used to come up and Marsten’s chief code/rule breaker Julian was putting variables that refer to themselves in incorrect order and getting weird results. I believe Marsten said “I never thought people would do that” something like that anyway. So basically the data section has to be in order. I think in the RT forum there is a post about it.December 17, 2020 at 3:09 am #112684JulianCohenParticipantI specialise in breaking stuff
December 17, 2020 at 7:03 pm #112685AnonymousInactiveTrent Rothall wrote:The error message never used to come up and Marsten’s chief code/rule breaker Julian was putting variables that refer to themselves in incorrect order and getting weird results. I believe Marsten said “I never thought people would do that” something like that anyway. So basically the data section has to be in order. I think in the RT forum there is a post about it.Ok, this is EXCEPTIONALLY FUNNY, and I have chuckled way more than I have any right to for such a simple statement with a well mannered joke.
Oh, and Trent; thank you for the clarification. Data section needs to be in order. Got it.
*giggle*
December 18, 2020 at 3:35 am #112686JulianCohenParticipantAre you laughing at me?
Is this some sort of computer geek in-joke?
Hey Seth…how many gym rats have been called geeks before
December 18, 2020 at 11:43 pm #112688AnonymousInactiveI wear both of these badges with honor, right next to my sewn in tie die peace sign patch.
-
AuthorPosts
- You must be logged in to reply to this topic.