Download MetaTrader 5

Experts: Universal configurable EA with include indicators inside.

To add comments, please log in or register
Store your source codes in MQL5 Storage. It is secure!
MetaQuotes Software Corp.
Moderator
181297
MetaQuotes Software Corp. 2011.11.07 12:18 

Universal configurable EA with include indicators inside.:

This is my own best EA, in the main lines can be setted up many things.

Author: Pavol

Pavol
31
Pavol 2011.11.07 20:39  
void CheckTradeDirection()
{
if(FunctionAccess=="Allowed"&&TimeAccess=="Allowed")
{
if(CurrentPos>=POS_REQ_QUANT)
{
if(Pos[CurrentPos][RVI_DIFFERENTION]>RVI_UNSAFE_DIFFERENTION)
{
if(SignalBuy==1&&SignalSell==0)
{
if(Pos[CurrentPos][RVI_SIGNAL]<Pos[CurrentPos-4][RVI_MAIN]-(RVI_MID_DIFFERENTION))
{
if(Pos[CurrentPos][RVI_SIGNAL]<Pos[CurrentPos-2][RVI_MAIN]-(RVI_BORDER_DIFFERENTION))
{
if(Pos[CurrentPos][TOTAL_ASK]>Pos[CurrentPos-4][TOTAL_ASK])
{
if(Pos[CurrentPos][VALUE_ASK]>Pos[CurrentPos-2][VALUE_ASK])
{
if(Pos[CurrentPos][TOTAL_CLOSE]>Pos[CurrentPos-4][TOTAL_CLOSE])
{
if(Pos[CurrentPos][VALUE_CLOSE]>Pos[CurrentPos-2][VALUE_CLOSE])
{
TradeSystem=BUY;
}
}
}
}
}
}
}
}
if(Pos[CurrentPos][RVI_DIFFERENTION]>RVI_UNSAFE_DIFFERENTION)
{
if(SignalBuy==0&&SignalSell==1)
{
if(Pos[CurrentPos][RVI_SIGNAL]>Pos[CurrentPos-4][RVI_MAIN]+(RVI_MID_DIFFERENTION))
{
if(Pos[CurrentPos][RVI_SIGNAL]>Pos[CurrentPos-2][RVI_MAIN]+(RVI_BORDER_DIFFERENTION))
{
if(Pos[CurrentPos][TOTAL_BID]<Pos[CurrentPos-4][TOTAL_BID])
{
if(Pos[CurrentPos][VALUE_BID]<Pos[CurrentPos-2][VALUE_BID])
{
if(Pos[CurrentPos][TOTAL_CLOSE]<Pos[CurrentPos-4][TOTAL_CLOSE])
{
if(Pos[CurrentPos][VALUE_CLOSE]<Pos[CurrentPos-2][VALUE_CLOSE])
{
TradeSystem=SELL;
}
}
}
}
}
}
}
}
BlockFunctionAccess();
}
}
else
{
if(Warning=="Show")
{
Alert("FunctionAccess/TimeAccess Blocked 'CheckTradeDirection()'");
}
}

}

this is new code, in 50 percents generate profit, so this is start of profiting lets go evolve this code!

Pavol
31
Pavol 2011.11.07 20:42  
only if is setted up to minutes, and 5 opened positions max
26994
154
26994 2011.11.08 16:51  

I need to buy and install a Void card for this! :) So many void using...


And if seriously... well, I have something from sAEm opera: "exp_Lego_4", posted in Ru... well, I'll post it here. Already sent to the moderator.

Pavol
31
Pavol 2011.11.10 21:39  
i have found small bug in my code/ this code, so wait i post it here with a edited code to profit!
To add comments, please log in or register