Attachments forums

List of attachments posted on this forum.


All files on forums: 163045

Re: Trend Indicators for MT4

loxx, Thu Sep 22, 2022 10:57 am

chickensword wrote: Thu Sep 22, 2022 3:25 am i think this would be a good addition to tradingview

dont know how it catches price so good but it does
Image
idk if this is correct, the code in that MT4 isn't the best, but this is probably the best we'll get on tradingview. ill brush this up and then publish it soon.

Yeah, that indicator is extremely bad code, here's why. These two lines of code shift SMA backward and then its painted forward, this is a 12 bar repaint

double MAUP1 = iMA(NULL, 0, MAPeriod, -MoveShift, MODE_SMA, PRICE_HIGH, i);
double MADN1 = iMA(NULL, 0, MAPeriod, -MoveShift, MODE_SMA, PRICE_LOW, i);

the signals could still be valid, but whoever coded this got this way wrong. you just can't do this. so the indicator in its drawing functions.
All files in topic