# very profitable, Please Help to find the problem of this AFL exploration and scanner code

#### makhlaghi

##### New Member
I wrote this AFL to find the trading pair in the spot market based on the MA of ADX of Vortex,
The indicator works well and shows visually what I want, but when I do analysis in AMIbroker.
the columns for the data are empty (exploration) and so no buy/sell signal (scanner).

_SECTION_BEGIN("MA of ADX of VOrtex");
// v 0.001 2
// MA of ADX of VOrtex
// Developed by Mehdi based on the ADX of Vortex

// ****************************************************************************************
// MAIN CODE
// ****************************************************************************************
period = Param("Period" , 14, 2 );
period2 = Param("Period2" , 3, 2 );

VMP = Sum( abs( H - Ref( L, -1 ) ), period );
VMM = Sum( abs( L - Ref( H, -1 ) ), period );
STR = Sum( ATR( 1 ), period );
VIP = VMP / STR;
VIM = VMM / STR;

DIDif=abs(VIP-VIM)*10;
DISum=(VIP+VIM)*10;
VIPD= VIP*10; // VIP Data
VIMD=VIM*10; //VIM Data
Plot( VIPD, "VI-Plus"+period, colorBlue | styleThick );
Plot( VIMD, "VI-Minus"+period, colorRed );
Plot(ADXofVortex,"ADX of Vortex", colorWhite, styleThick | styleLine);
MAADXV= MA(ADXofVortex, period2); // moving average of ADX of Vortex
Plot (MA(ADXofVortex, period2), "MAADXV", colorYellow, styleThick | styleLine);
Plot(15,"",colorWhite,styleLine);
Plot(10,"",colorWhite,styleDashed);

// END OF "MAIN CODE" SECTION

// ****************************************************************************************
// TRADING SYSTEM ENTRY FORMULAS
// ****************************************************************************************

// Exploration in Amibroker

Filter = 1;

// END OF "TRADING SYSTEM ENTRY FORMULAS" SECTION

// ****************************************************************************************
// TRADING SYSTEM EXIT FORMULAS
// ****************************************************************************************
Sell = Short;

// Exploration in Amibroker

// END OF "TRADING SYSTEM EXIT FORMULAS" SECTION

// ****************************************************************************************
// TRADING SYSTEM EXCESSIVE ENTRY/EXIT SIGNALS REMOVING FORMULAS
// ****************************************************************************************
Sell = ExRem(Sell, Buy);
Short = ExRem(Short, Cover);
Cover = ExRem(Cover, Short);

// END OF "TRADING SYSTEM EXCESSIVE ENTRY/EXIT SIGNALS REMOVING FORMULAS" SECTION

// ****************************************************************************************
// END OF CODE (BBFEAR.AFL)
// ****************************************************************************************
/**/
_SECTION_END();

#### Attachments

• 147.1 KB Views: 223