Clarification in Coding

 
So I'm very new to coding and just looking at code. I am trying to figure out what "returnBars" and "calculateTMA"  that are highlighted below refer to. Are they external indicator or what? Thanks for your help!

<decompiled code removed>.
 
  1. When you post code please use the SRC button! Please edit your post.
               General rules and best pratices of the Forum. - General - MQL5 programming forum

  2. for (int Li_4 = Li_16; Li_4 &gt;= 0; Li_4--) {
             Ld_20 = (HalfLength + 1) * iMA(NULL, 0, 1, 0, MODE_SMA, Price, Li_4);
             Ld_28 = HalfLength + 1;

    Ask the owner of the source code to give it to you or have him fix it for you.

    Decompiled code is stolen code. Either you are a thief, a fence, or the receiver of stolen (intellectual) property. Either way we will not be an accomplice after the fact to theft.
              See also forum.MQL4.com/41864#490649

    If you post decompiled code again, you will likely be banned.

    Don't tell us you found it on the 'net: if someone stole your bank details and uploaded them on to the internet, is it OK for everyone to use them because "someone uploaded it, I don't know why I can't use that"?

 
whroeder1:
  1. When you post code please use the SRC button! Please edit your post.
               General rules and best pratices of the Forum. - General - MQL5 programming forum

  2. Ask the owner of the source code to give it to you or have him fix it for you.

    Decompiled code is stolen code. Either you are a thief, a fence, or the receiver of stolen (intellectual) property. Either way we will not be an accomplice after the fact to theft.
              See also forum.MQL4.com/41864#490649

    If you post decompiled code again, you will likely be banned.

    Don't tell us you found it on the 'net: if someone stole your bank details and uploaded them on to the internet, is it OK for everyone to use them because "someone uploaded it, I don't know why I can't use that"?


This is simply the TMA.mq4 file that is available for free from about 30 websites with a quick google. Its nothing proprietary or being stolen, regardless I am only interested in the "returnBars" and "calculateTMA" cited above, I want to convert this for use on the cAlgo/cTrade platform.

 
nghtraidr86:

This is simply the TMA.mq4 file that is available for free from about 30 websites with a quick google. Its nothing proprietary or being stolen, regardless I am only interested in the "returnBars" and "calculateTMA" cited above, I want to convert this for use on the cAlgo/cTrade platform.

Please don't argue or try to justify it, this is decompiled code. Ignorance is not an argument.

 

As I stated before I am new to coding and don't know what decompiled vs regular source code looks like. I was just asking for clarification. I wasn't asking for someone to code anything. Thought this was a forum for help, sorry for the problems.

 
nghtraidr86:

As I stated before I am new to coding and don't know what decompiled vs regular source code looks like. I was just asking for clarification. I wasn't asking for someone to code anything. Thought this was a forum for help, sorry for the problems.

Since that is my indicator originally (and the very, very old version I might add), see this thread : https://www.mql5.com/en/forum/181241

No need for any decompiled code

Triangular moving average (TMA) ...
Triangular moving average (TMA) ...
  • 2012.04.02
  • www.mql5.com
The purpose of this thread is more personal ... At some stage (some 4 years ago, posted it at this post : https://www.mql5...
 
nghtraidr86:

As I stated before I am new to coding and don't know what decompiled vs regular source code looks like. I was just asking for clarification. I wasn't asking for someone to code anything. Thought this was a forum for help, sorry for the problems.

... Personally, I think that ignorance is every argument here, because there's been no known way of decompiling MQL4 code since the introduction of v600 of MT4, which was nearly 4 years ago. Any decompiled code predates that. I think it's fully understandable that someone new to MT4 is entirely unaware of this history.

At the risk of sharing something of no-less-dubious provenance, it looks to me, from the very brief snippet remaining in this thread, as though the original (undecompiled) code is available at the following page on the Russian section of this site: https://www.mql5.com/ru/forum/70690#comment_2154293

Returning to your original question, knowing nothing about this indicator, "returnBars" appears to be a parameter (i.e. something you change on the Inputs tab) which controls how the indicator does its calculation. "calculateTMA()" is a function inside the code for this indicator, not an external indicator.

 
JC:

At the risk of sharing something of no-less-dubious provenance [...]

... Ah, Mladen has beaten me to it. Provenance is fine. <g>
 
JC:

... Personally, I think that ignorance is every argument here, because there's been no known way of decompiling MQL4 code since the introduction of v600 of MT4, which was nearly 4 years ago. Any decompiled code predates that. I think it's fully understandable that someone new to MT4 is entirely unaware of this history.

At the risk of sharing something of no-less-dubious provenance, it looks to me, from the very brief snippet remaining in this thread, as though the original (undecompiled) code is available at the following page on the Russian section of this site: https://www.mql5.com/ru/forum/70690#comment_2154293

Returning to your original question, knowing nothing about this indicator, "returnBars" appears to be a parameter (i.e. something you change on the Inputs tab) which controls how the indicator does its calculation. "calculateTMA()" is a function inside the code for this indicator, not an external indicator.

"returnBars" is not a parameter, neither is "calculateTMA"

In the case of "returnBars" : it is a value that was used to pass to called instance in order to get the desired value (in the case of "returnBars" the called instance was "asked" to return how many bars exactly were changed in the target time frame in order to recalculate what is needed not what is assumed to be needed to recalculate for the target time frame). New ways of mtf I am using are not using that mode any more - since we now have much more buffers available there are much simpler and faster ways to do the same thing

Almost the same thing when the "calculateTMA" is used as the value of the first parameter (not going to name it since I suspect it is going to cause confusion if I name it)

 
Mladen Rakic:

"returnBars" is not a parameter

(The code I'd found at https://www.mql5.com/ru/forum/70690#comment_2154293 may be some sort of extension of your original. There, "returnBars" is both a value passed to iCustom() and also, separately, a value which you can give you to the Timeframe extern. I'd only spotted the latter.)
 
JC:
(The code I'd found at https://www.mql5.com/ru/forum/70690#comment_2154293 may be some sort of extension of your original. There, "returnBars" is both a value passed to iCustom() and also, separately, a value which you can give you to the Timeframe extern. I'd only spotted the latter.)

No extension(s) whatsoever - those are the originals that were posted by me on some forums (mainly on TSD while it existed) - as you can see in the signature too.

In any case use the stuff from the tma thread - newer code was posted there

Reason: