Correlation EA - Am I close?

Hi,

Im very new to MQL4 and programming in general. Im looking to create an ea that opens 3 currency pairs at a time EURUSD - EURGBP - USDJPY, each with different lots sizes. The way I would like to open is if the EURUSD is above the 20 MA then it opens a buy on the EURUSD and a sell on the EURGBP and USDJPY and vice versa if the EURUSD is below the 20 MA with a close of the total profit of 30 points. Please could someone far more knowledgeable than me let me know if anywhere close with this or even help me. Thanks.

void OnDeinit(const int reason)
{
extern double Lots=00.5;
extern int TakeProfit=30; // Take profit value in points
datetime NewTime=0;
int start()
{
if(NewTime!=Time[0])
{
NewTime=Time[0];
if(Close[1]>=Open[1])
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+(TakeProfit*_Point),NULL,0,0,Blue);
else
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-(TakeProfit*_Point),NULL,0,0,Red);
}
return(0);

}
//±-----------------------------------------------------------------+
//| Expert tick function |
//±-----------------------------------------------------------------+
void OnTick()
{

//We calculate the current EURGBP Ask price
double EURUSDAsk=NormalizeDouble(SymbolInfoDouble(“EURUSD”,SYMBOL_ASK),_Digits);

//We calculate the current EURGBP Ask price
double EURGBPAsk=NormalizeDouble(SymbolInfoDouble(“EURGBP”,SYMBOL_ASK),_Digits);

//We calculate the current EURGBP Ask price
double USDJPYAsk=NormalizeDouble(SymbolInfoDouble(“USDJPY”,SYMBOL_ASK),_Digits);

//We Calculate the moving avrage for 20 candles
double MyMovingAverage = iMA(_Symbol,PERIOD_H1, 20, 0, MODE_SMA, PRICE_CLOSE, 0);

//We Calculate the EURUSD moving avrage for 20 candles
double EURUSDMovingAverage= iMA(“EURUSD”,PERIOD_H1, 20, 0, MODE_SMA, PRICE_CLOSE, 0);

// Chart output

Comment(
“My Ask price: “,Ask,”\n”,
“EURUSD Ask price:”,EURUSDAsk,"\n",
“My Moving Average:”,MyMovingAverage,"\n",
“EURUSD Moving Average:”,EURUSDMovingAverage,"\n"
)
};

//±-----------------------------------------------------------------+