Could any one help me out? Why my code cannot place any Buy Order?

 
<decompiled code removed>

-----

This is my code for an EA. However, the EA just place Sell order but Buy order. Could any one help me to solve this problem?  

 

Probably because it's not your code but decompiled code.

It's strictly forbidden to use such code and post about it on this site. Please don't do it again or you will receive a ban.

 
Alain Verleyen:

Probably because it's not your code but decompiled code.

It's strictly forbidden to use such code and post about it on this site. Please don't do it again or you will receive a ban.

It is actually my code... Now I am trying to learn coding.

You can see 

"double Ld_32=iMA(NULL,0,PeriodEMA,0,MODE_SMA,PRICE_MEDIAN,1);

if (Open[1]<Ld_32&&Close[1]>Ld_32+PriceParameter){ TradeStatus=True; Gi_240=OrderSend(Symbol(),OP_BUY, Lots,Ask,0, Bid-(Point*StopLoss),Bid+(TakeProfit*Point), Products, MagicNumber, 0, Blue);} " 

This is just an simple strategy I want to test the code based on Moving Average. This would be ridiculous if this code run on real account when every time the previous tick hit MA and place Order! It will ruin my account. 

 
Try to place such order manually in the terminal. I guess, you can't do it... if so, check your parameters, especially SL and TP values
 
Huan Vi:

It is actually my code... Now I am trying to learn coding.

You can see 

"double Ld_32=iMA(NULL,0,PeriodEMA,0,MODE_SMA,PRICE_MEDIAN,1);

if (Open[1]<Ld_32&&Close[1]>Ld_32+PriceParameter){ TradeStatus=True; Gi_240=OrderSend(Symbol(),OP_BUY, Lots,Ask,0, Bid-(Point*StopLoss),Bid+(TakeProfit*Point), Products, MagicNumber, 0, Blue);} " 

This is just an simple strategy I want to test the code based on Moving Average. This would be ridiculous if this code run on real account when every time the previous tick hit MA and place Order! It will ruin my account. 

It's not your code.

what is the meaning of Ld_32 ? what is the meaning of Gi_240 ?

 
Alain Verleyen:

It's not your code.

what is the meaning of Ld_32 ? what is the meaning of Gi_240 ?

Yes, I just use some loser EA as an template on the internet which for saving my time because it consists some popular function such as trailing. I just get familiar with MQL4 so It's the quickest way to test some strategy. As I know, the template EA comes from Metaquotes so I think it is free as a source code library.

 

Why don't you want to listen to me ?

This is decompiled code, that means illegal code. Ignorance is not an argument.

The topic is closed.