BLOCK OF codes, examples, learning , my experience

cheap

Active Member
#11
Hey,
Yes, mtf function still confusing, not enough examples there..
take as case of expandmode and looping timeframe timeframefuction ..

Yes, you're right.. it sounds like we need to live with such stuff. there gonna be good people too, who are not selfish in nature, but rare breed. Very Big people do not've ego, it's really a fact.

BUT I NEVER UNDERSTOOD, WHY SOME PEOPLE ALWAYS WANT FEUD ?THEY WANT FEUD BETWEEN FOLKS.

Even i post 50's of codes , still few problem can't be solved, BECAUSE IT'S NEVER BEEN THOUGHT THAT WAY .. so per these problems..
 
Last edited:

cheap

Active Member
#12
LEARNING:

iF you are KIND OF PERSON , WHO DONT SAY BAD WORDS , WHO DON'T DITCH OTHER PEOPLE, WHEN OTHER PEOPLE TRY TO DITCH, YOU JUST LET THEM KNOW.

SUCH WANT THAT YOU BEHAVE LIKE A BAD PERSON, BECAUSE IT WAS EASIER FOR THEM TO IGNORE YOU. IF YOU DON'T BEHAVE LIKE A BAD PERSON , THEY HATE YOU
SOMEBODY THINKING THEY'RE HAVING ENTERTAINMENT, SOMEBODY LEARNING A LESSON ..

AS PETER THEIL SAYS, THERE'RE LOT OF MISTAKES WHICH DOESN'T TEACH YOU ANYTHING ! JUST NOTHING !

WONDERING.!
 
Last edited:

cheap

Active Member
#13
Kindly see this article:
https://www.amibroker.com/guide/a_mistakes.html

“=” (assignment) vs “==” (equality check)
Using parentheses
IIf function
IIf is for arrays, WriteIf is for strings
if-else statement needs boolean (or single numeric expression), not array
Barcount vs BarIndex()
TimeFrameExpand( ) is required to match data with original time frame

Code:
IIf is for arrays, WriteIf is for strings

IIf functions should be used to handle arrays, if you need conditional text function use WriteIf instead.

EXAMPLE

Incorrect code:

variable = IIf(Condition, "Text 1","Text 2" ); // WRONG

IIf( ) function returns array, NOT STRING, so it’s impossible to assign text to variable with use of IIF. Use WriteIf( ) function instead:

Correct code:

variable = WriteIf( condition, "Text 1", "Text 2" ); // CORRECT

if-else statement needs boolean (or single numeric expression), not array

simple meant, if else doesn't execute array.


if( Close > Open ) // WRONG

Close and Open, like if we want to intend for specific bar we do it Close[x] some value there, if it's not mentioned, that means it's for all .
since it's array , it's not right to do it.


==
This is something interesting, but you need to look for more examples
Code:
Barcount vs BarIndex()
There is a fundamental difference between BarCount and BarIndex(). BarCount is a numeric variable that holds just one number (the count of elements in array). On the other hand BarIndex() is a function that returns ARRAY representing consecutive index of each bar.

EXAMPLE

Incorrect code:

for (i = 0; i < BarIndex();i++ ) // WRONG 
{ 
  // your formula 
}

It’s not allowed to use ARRAY inside for loop, and Barindex() returns ARRAY. That is why it’s necessary to change the formula.

Correct code:

for (i =0 ; i < BarCount ;i++ )  // CORRECT 
{ 
  //your formula 
}
==TimeFrameExpand( ) is required to match data with original time frame

The TimeFrameSet( ) replaces current price/volume arrays: open, high, low, close, volume, openint, avg with time-compressed bars of specified interval
once you switched to a different time frame all calculations and built-in indicators operate on selected time frame. To get back to original interval call TimeFrameRestore( ) function.

On MTF , NOT LOT OF WORK IS DONE , SO YOU'VE TO BE CAREFUL


LEARNING:
PATIENCE IS NOTHING I TELL YOU, IF YOU HAVE FOLKS AROUND YOU , THEY WILLING TO MAKE SOMETHING, IT WILL WORK ..
IF YOU DONT HAVE, SIMPLE! YES SIMPLE! YOU WON'T GET IT!
WHAT TO DO?
YES! SEARCH NEXT....

ON EARTH , THERE'S NO SINGLE GUY WHO CAN CLAIM I KNOW SOMETHING WHICH SOMEONE ELSE DOESN'T KNOW, ATLEAST FOR ALL PROFESSION THAT WE DO KNOW.
SO NATURE IS FAIR FOR YA! LOOK FOR AGAIN AND AGAIN ..
IF YOU DONT! GUESS WHAT?
YOU ARE OBLIGED TO SAY , YOU WASTED TIME ! ISN'T IT SO?
 
Last edited:

Similar threads