Created
January 23, 2016 21:17
-
-
Save matthewkastor/147d48770cd3a540c663 to your computer and use it in GitHub Desktop.
function for opening a Sell order in metatrader 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// int result = OpenSellOrder(0.01, 0.00300, 0.00900); | |
int OpenSellOrder(double lots, double stopLossPips, double pipsProfit){ | |
double takeProfit = NormalizeDouble(Bid - pipsProfit, Digits); | |
double stopLoss = NormalizeDouble(Bid + stopLossPips, Digits); | |
return OrderSend(Symbol(),OP_SELL,lots,Bid,3,stopLoss,takeProfit,"",MAGICMA,0,clrPink); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment