Recent Strength indicator -
... 18 58 66 67 68 69 70 78 ...

thread: Recent Strength indicator

  1. #671
    Junior Member trek22's Avatar
    14
    I'm not positive if this is the ideal place to ask. When it isn't please direct me to the ideal spot to ask

    am new to programming in MQL4 along with the metatrader app and I'm confused about backtesting and the Time functions.I ran the app in the metatrader tester along with the journal messages I get are quite confusing. Also I wrote a very simple program to attempt to test my understanding by of the backtester. The program was made to just tell me that the timing of when events occur so that I can verify my understanding of exactly what the Metatrader backtester journal messages mean.

    Within the OnTick purpose I set this:

    void OnTick()

    //--

    for (int I=Bars-2;igt;0;I--)
    Print(Time[I]);
    Print(TimeDay(Time[I]));


    // ------------------------------------------------------------------

    I ran a simple backtest in the M5. Regarding the journal, the first column of the journal Time makes sense, that just records the time that parts of the backtesting has been processed. Everything there's as I anticipated.

    The message pillar, however, is quite confusing. The first portion of the message column is a date followed by what seems to be a moment. That all seems well and good except there are a number of openings in the time however I suppose those are just gaps in the information.

    That's not confusing to me. What I believed the app that I wrote was about to do was simply print the date and the timing of those events. I believed that every other line could have a number to get a date that would just correspond to the initial portion of the message column and I believed that every other line could have a time that corresponded to the time that is the exact next portion of the message column. Unfortunately that does not appear to be true in any way. Particularly the only times it is giving me are instances generally goes up on 5 min increments. It skips around even more, always on a multiple of 5. Worse that the dates it gives me don't ascend in order. They occasionally jump from day to day. In case the backtester isn't just going through time from the most distant past into the most recent past. What's it doing? Ever since I picked every tick as the way to mimic the output signal why is it giving me precisely one time per 5 minute period?

    The range I am searching is all of yesterday and today and this is information I downloaded automatically from the history centre, not info I collected myself.

    The last thing that I noticed the days the messages segment is telling me this information is from is between February 24th and today. The date ranges make no sense for me that's the limit in how”off” it's.

    Thank you for your help! I'm just really confused

  2. #672
    Junior Member kmokzok's Avatar
    27
    quote I can not know ddi.doc, most of it's in Chinese. The best I could do is attempt to translate the formulation in the green box in your article #690. I'm not acquainted with this programming language, hence this is my best guess only. TR is apparently the authentic range, but this isn't referenced afterward, hence I feel it's redundant. For each candle: 1. If the (current candle high and the current candle low) gt;= (preceding candle high and the previous candle low), then: DMZ = the larger of (1) the difference between the current candle's high...
    Hanover, can you help me make it into a MT4 indior?
    thank you very much

    more detail as below, hope you can understand well

    two MQL4 language function: MathAbs, MathMax
    setup parameter: N=13 #65307; N1=30 #65307; M=10 #65307; M1=5
    I will explain it in period DAY
    yesterday high price = YH
    yesterday low price = YL
    today high price =H
    today low price =L
    #21028;#26029;#26041;#27861; analysis method
    1#12289; TR=#65288;#26368;#39640;#20215; -#26152;#26085;#26368;#39640;#20215;#65289;#30340;# 32477;#23545;#20540;#19982;#65288;#26368;#20302;#2 0215; -#26152;#26085;#26368;#20302;#20215;#65289;#30340;# 32477;#23545;#20540;#20004;#32773;#20043;#38388;#3 6739;#22823;#32773;#12290;
    TR=the bigger one's value, between mathabs(H-YH) and mathabs(L-YL)
    TR=Mathmax(mathabs(H-YH) ,mathabs(L-YL))
    if H=100,YH=90,L=80, YL=75
    mathabs(H-YH)=10
    mathabs(L-YL)=5
    TR=10 (the bigger one's value)

    2#12289;#22914;#26524;#65288;#26368;#39640;#20215; #26368;#20302;#20215;#65289; lt;=#65288;#26152;#26085;#26368;#39640;#20215; #26152;#26085;#26368;#20302;#20215;#65289;#65292; DMZ=0#65292;
    if (H L) lt;=(YH YL), DMZ=0
    #22914;#26524;#65288;#26368;#39640;#20215; #26368;#20302;#20215;#65289; gt;#65288;#26152;#26085;#26368;#39640;#20215; #26152;#26085;#26368;#20302;#20215;#65289;#65292; DMZ=#65288;#26368;#39640;#20215; -#26152;#26085;#26368;#39640;#20215;#65289;#30340;# 32477;#23545;#20540;#19982;#65288;#26368;#20302;#2 0215; -#26152;#26085;#26368;#20302;#20215;#65289;#30340;# 32477;#23545;#20540;#20013;#36739;#22823;#20540;#1 2290;
    if (H L) gt; (YH YL), DMZ=TR

    3#12289;#22914;#26524;#65288;#26368;#39640;#20215; #26368;#20302;#20215;#65289; gt;=#65288;#26152;#26085;#26368;#39640;#20215; #26152;#26085;#26368;#20302;#20215;#65289;#65292; DMF=0#65292;
    if (H L) gt;=(YH YL),DMF=0
    #22914;#26524;#65288;#26368;#39640;#20215; #26368;#20302;#20215;#65289; gt;#65288;#26152;#26085;#26368;#39640;#20215; #26152;#26085;#26368;#20302;#20215;#65289;#65292; DMF=#65288;#26368;#39640;#20215; -#26152;#26085;#26368;#39640;#20215;#65289;#30340;# 32477;#23545;#20540;#19982;#65288;#26368;#20302;#2 0215; -#26152;#26085;#26368;#20302;#20215;#65289;#30340;# 32477;#23545;#20540;#20013;#36739;#22823;#20540;#1 2290;
    if(H L) gt;(YH YL),DMF=TR

    4#12289; DIZ=N#20010;#21608;#26399; DMZ#30340;#21644; /#65288; N#20010;#21608;#26399; DMZ#30340;#21644; N#20010;#21608;#26399; DMF#30340;#21644;#65289;
    N=13
    DIZ=(DMZ1 DMZ2 DMZ3,,,DMZ13)/((DMZ1 DMZ2 DMZ3,,,DMZ13) (DMF1 DMF2 DMF3,,,DMF13))

    5#12289; DIF=N#20010;#21608;#26399; DMF#30340;#21644; /#65288; N#20010;#21608;#26399; DMF#30340;#21644; N#20010;#21608;#26399; DMZ#30340;#21644;#65289;
    N=13
    DIF=(DMF1 DMF2 DMF3,,,DMF13)/((DMZ1 DMZ2 DMZ3,,,DMZ13) (DMF1 DMF2 DMF3,,,DMF13))

    6#12289; DDI=DIZ-DIF

    7#12289; ADDI=DDI #22312; N1#20010;#21608;#26399;#20869;#26435;#37325;#20026 ; M#30340;#21152;#26435;#24179;#22343;
    setup parameter: N=13 #65307; N1=30 #65307; M=10 #65307; M1=5
    ADDI= take the maximum value of top 10 from 30 DDI value
    ADDI=(DDITOP1 DDI@TOP2 DDI@TPO3,,,DDI@TOP10)/10 (M)

    8#12289; AD=ADDI #22312; M1#20010;#21608;#26399;#20869;#30340;#31616;#21333 ;#31227;#21160;#24179;#22343;
    AD=(ADDI1 ADDI2 ADDI3,,,ADDI5)/5 (M1)

  3. #673
    Senior Member Tataylo's Avatar
    435
    can you help me to create it to some MT4 indior?
    Would you show me how the indior might be helpful? Which kind of price behavior does it highlight? How can I use it profitably?

  4. #674
    quote Would you show me the way the indior might be helpful? What kind of price behaviour does it highlight? How could I use it profitably?
    Hi there, I've a power meter indicador based on lots of routine MT4 indiors. It utilizes no buffer. Just plot a percent strength. I am attempting to make it as an oscillator to observe the percent previously. So I made a buffer to start storing this percent value and plot the histogram. Of course it begins plotting just forward information. My question is if it´s possible to force the indior to plot past bars too. If yes, would you give me a clue?

  5. #675
    Senior Member Tataylo's Avatar
    435
    My query is whether its possible to induce the indior to plot beyond bars also. If so, would you give me a hint?
    Assuming I understand you correctly....

    Below is a simple indy that plots ADX. To change it in a line to a histogram, change
    SetIndexStyle(0, DRAW_LINE,0,1,Gray);
    into
    SetIndexStyle(0, DRAW_HISTOGRAM,0,1,Gray);

    To possess it plot strength instead of ADX, change the lineup
    ExtBuffer1[I] = iADX(NULL, 0, ADXPeriod, PRICE_CLOSE, MODE_MAIN, I);
    into
    ExtBuffer1 = your calculation for strength of histogram pub #I

    The indy was published using MQL4 build 509. I really don't know whether it will compile correctly in assemble 600 onward.
    Inserted Code // ------------------------------------------------------------------ //| ADX only.mq4 | // ------------------------------------------------------------------ #property indior_separate_window #property indior_buffers 1 #property indior_color1 Gray extern int ADXPeriod = 13; dual ExtBuffer1#91;#93;; // ------------------------------------------------------------------ int init() // ------------------------------------------------------------------ SetIndexBuffer(0, ExtBuffer1); SetIndexStyle(0, DRAW_LINE,0,1,Gray); IndiorShortName(ADX ( ADXPeriod )); return(0); // ------------------------------------------------------------------ int start() // ------------------------------------------------------------------ int I, limit; int counted_bars = IndiorCounted(); should (counted_bars lt; 0) return(-1); should (counted_bars gt; 0) counted_bars--; limitation = Bars - counted_bars; for (I=0; ilt;limitation; t ) ExtBuffer1#91;I#93; = iADX(NULL, 0, ADXPeriod, PRICE_CLOSE, MODE_MAIN, I); return(0); // ------------------------------------------------------------------

  6. #676
    quote
    Tks for the quick reply. I tried this with iCutsom (calling the buffer I created in this other indior). It would be impossible to write in one line the calculation as it uses countless code lines. Allow me to attach an image. I think it's going to be easier for me to describe. I made it start ploting the values as histogram just after it is attached, since it gives me exactly the exact same value all candles previously. So it would resemble a line that is horizontal.

  7. #677
    Senior Member Tataylo's Avatar
    435
    It would not be possible to write in 1 line the calculation because it uses hundreds of code lines.
    You can have as many calculation statements as you need, then simply assign the last result to ExtBuffer1[I]
    The code I posted must function as a'wrapper' allowing series of values to be plotted via a MQL4 buffer.

    I created it begin ploting the values as histogram only after it is attached, because it provides me the exact same worth all candles in the past. Therefore it would resemble a line that is flat.
    You probably need to figure the potency value for each given candle (value of I). By way of example, use Open[I], Close[I], iCustom(...,I) etc to calc the significance of the i-th worth to be plotted. The for loop increases the value of I for each point plotted.

    I really don't understand how your strength calc functions, hence I can not help you any further. Perhaps you could place your .mq4 origin in among those I code your indiors for complimentary stickers, and someone else can help you. Or if you are willing to pay, you may try https://www.mql5.com/en/job or https://www.elance.com/r/contractors/q-MQL4 Programming.

  8. #678
    Junior Member kmokzok's Avatar
    27
    quote Can you show me the way the indior might be useful? Which kind of price behaviour does it highlight? How could I use it profitably?
    Hanove, thanks your reply.

    DDI is more inclined to demonstrate the direction of a long band trend, not turn reddish or turn green.
    If MACD doesn't turn red, only DDI suddenly turned red, then turned red is invalid.

    Together with MACD#65292;MACD DDI double insurance, double saftely. They are all about PRICE, LONG TREND
    and that I can send you the software, you can attempt to use it if it's very good for you to analysis
    (the applications http://www.wind.com.cn/NewSite/wft.html)
    should you think it's unuseful, I would not bother you again.
    thanks a lot.







  9. #679
    I have tweaked your indis a bit and they have started made me a chance. Due to whoever made them actually... it was excellent idea from the first move.
    Two days outcomes.

  10. #680
    Junior Member nereytta's Avatar
    15
    Query: the current strength indior canot operate on non-regular TF such as H2 or H8 fo instance?
    Am I correct?

  •