Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
Find Out More Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Solar Wind Joy for Amibroker (AFL)

Rating:
3 / 5 (Votes 4)
Tags:
oscillator, amibroker

Was a request from a member to Convert Solar wind joy in MT4 indicator to AFL in
http://www.traderji.com/amibroker/98121-convert-solar-wind-joy-mt4-indicator-afl-2.html

Indicator / Formula

Copy & Paste Friendly
/***************************************
 Solar Wind Joy Translated from MT4 to Amibroker
 Done by KelvinHand
****************************************/
Version(4.90);


period = Param("Period",35, 1);
smooth = Param("Smooth",10, 1);


MaxHHV = HHV(H, period);
MinLLV = LLV(L, period);

Value1=0;
Fish1=0;

aFish=Null;

for(i=0; i<BarCount; i++)
{
    MaxH = MaxHHV[i];
    MinL = MinLLV[i];
    Price = (H[i]+L[i])/2;
       
    Value = 0.33*2*((Price-MinL)/(MaxH-MinL)-0.5)+0.67*Value1;
    Value = Min(Max(Value, -0.999), 0.999);
    
    aFish[i] = 0.5*log((1+Value)/(1-Value))+0.5*Fish1;
    
    Value1 = Value;
    Fish1 = aFish[i];
    
    if (aFish[i]>0)
       aFish[i]=10;
    else
       aFish[i]=-10;
}


aSmth=0;

for(i=0; i<BarCount; i++)
{
  SumI=0;
  SumW=0;
  
  for(k=0; k<smooth && (i-k)>=0; k++)
  {
     weight = smooth-k;
     SumW += weight;
     SumI += weight*aFish[i-k];
  }
     
   if (SumW>0)
      aSmth[i] = SumI/SumW;     
  
}

aLine=0;
for(i=0; i<BarCount; i++)
{
  SumI=0;
  SumW=0;
  
  for(k=0; k<smooth && (i-k)>=0; k++)
  {
     weight = smooth-k;
     SumW += weight;
     SumI += weight*aSmth[i-k];
  }
     
   if (SumW>0)
      aLine[i] = SumI/SumW;     
   
}


colorH = IIf(aLine>0, colorBrightGreen, IIf(aLine<0, colorRed, colorGold));
Plot(aLine, "", colorH, stylenolabel|styleHistogram);

colorL = IIf(aLine>0 AND Ref(aLine, -1)>0, colorBrightGreen, IIf(aLine<0 AND Ref(aLine, -1) <0, colorRed, colorGold));
Plot(aLine, "", colorL, stylenolabel|stylethick);



PlotGrid(0, colorLightgrey, 6, 1, True);  

3 comments

1. hbkwarez

if u use amibroker 5.7 then replace

PlotGrid(0, colorLightgrey, 6, 1, True);

By

PlotGrid(0, colorLightGrey);

2. amol15

I want to convert two MT4 Formula into AFL, If possible give me your mail id.Thank you.

3. mamassani

it’s not the same indicator that i have seen at metatrader

Leave Comment

Please login here to leave a comment.

Back