Need help!!!!!!!!!

 

I am absolutety new to MQL. I need an expert advisor which would automatically trade whenever it is activated on EUR/USD chart......The criteria are -

Account balance - $200

Lot size - 0.01

Stop loss - $1

Take profit - $0.3

This means - buy / sell EUR / USD pair and close the position when either profit is $0.3 or loss is $1.



 
rajesh.zad:

I am absolutety new to MQL. I need an expert advisor which would automatically trade whenever it is activated on EUR/USD chart......The criteria are -

Account balance - $200

Lot size - 0.01

Stop loss - $1

Take profit - $0.3

This means - buy / sell EUR / USD pair and close the position when either profit is $0.3 or loss is $1.



Do you know what "spread" is?

Are your limits before or after spread?

 
engcomp:

Do you know what "spread" is?

Are your limits before or after spread?


limits are after spread.
 

Use OrderProfit() function. It returns the selected position profit.

if ( OrderProfit() <= 1 || OrderProfit() >= 0.3 ) { OrderClose() }

Reason: