Page 6 of 16

Re: Breakout

Posted: Sat May 20, 2023 2:52 pm
by Chickenspicy

Code: Select all

 int start()

  {

    int limit;

    int counted_bars;

    //double prev, current, old;

    double Value=0,Value1=0,Value2=0,Fish=0,Fish1=0,Fish2=0;

    double price;

    double MinL=0;

    double MaxH=0;

   

    counted_bars = IndicatorCounted();

    if ( counted_bars > 0 ) counted_bars--;

    limit = Bars - counted_bars;



    for(int i=0; i<limit; i++)

      {

        MaxH = High[iHighest(NULL,0,MODE_CLOSE,period,i)];                       

        MinL = Low[iLowest(NULL,0,MODE_CLOSE,period,i)];                          

        price = (Open[i]+ Close[i])/2;                                             



        if(MaxH-MinL == 0) Value = 0.33*2*(0-0.5) + 0.67*Value1;

        else Value = 1.369999*2*((price-MaxH)/(MinL-MaxH)-0.5) + 1.3899999*Value1;



        Value=MathMin(MathMax(Value,-0.999),0.999);

 

        if(1-Value == 0) ExtBuffer0[i]=0.5+0.5*Fish1;

        else ExtBuffer0[i]=0.5*MathLog((1+Value)/(1-Value))+0.5*Fish1;



        Value1=Value;

        Fish1=ExtBuffer0[i];

      }

    int counted_bars2 = IndicatorCounted();

    if ( counted_bars2 > 0 ) counted_bars2--;

    int limit2 = Bars - counted_bars2;

    for ( int j = limit2; j >= 0; j-- )

      {

        if ( Arrow )

          {

            if ( ExtBuffer0[j+SIGNAL_BAR+1] > 0.0  && ExtBuffer0[j+SIGNAL_BAR] < 0.0 ) manageArr(j+1, clArrowBuy,  233, false);

            if ( ExtBuffer0[j+SIGNAL_BAR+1] < 0.0  && ExtBuffer0[j+SIGNAL_BAR] > 0.0 ) manageArr(j+1, clArrowSell, 234, true );

          }

      }

    return(0);

  }

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

void manageArr(int j, color clr, int theCode, bool up)   

  {

    string objName = PREFIX + Time[j];

    double gap  = 3.0*iATR(NULL,0,20,j)/4.0;

    

    ObjectCreate(objName, OBJ_ARROW,0,Time[j],0);

    ObjectSet   (objName, OBJPROP_COLOR, clr);  

    ObjectSet   (objName, OBJPROP_ARROWCODE,theCode);

    ObjectSet   (objName, OBJPROP_WIDTH,ArrowSize);  

    if ( up )

      ObjectSet(objName,OBJPROP_PRICE1,Open[j]+gap);

    else  

      ObjectSet(objName,OBJPROP_PRICE1,Close[j] -gap);

  }

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

Re: Breakout

Posted: Sat May 20, 2023 2:59 pm
by DAVID99
Chickenspicy wrote: Fri May 19, 2023 7:16 am the strength meter is become flawed to me it is too fast or slow cant find a balance
prefer ai and psa
testing xard and ai
Image
How to download the strength meter?

Re: Breakout

Posted: Sat May 20, 2023 3:12 pm
by Chickenspicy
DAVID99 wrote: Sat May 20, 2023 2:59 pm How to download the strength meter?
Purchase mql5 store
Currency Strength Meter Ai

Re: Breakout

Posted: Sat May 20, 2023 3:13 pm
by Chickenspicy
:

Re: Breakout

Posted: Sat May 20, 2023 3:16 pm
by Chickenspicy
.

Re: Breakout

Posted: Sat May 20, 2023 3:18 pm
by Chickenspicy
Superfast

Re: Breakout

Posted: Sat May 20, 2023 3:25 pm
by Chickenspicy
A

Re: Breakout

Posted: Sat May 20, 2023 3:32 pm
by Chickenspicy
No idea

Re: Breakout

Posted: Sat May 20, 2023 3:35 pm
by Chickenspicy
.

Re: Breakout

Posted: Sat May 20, 2023 3:36 pm
by Chickenspicy
Can repaint works in direction of trends