sltp-currency
sltp-currency

sltp-currency最新版

更新日期:
2022-03-16
分类标签:
语言:
中文
平台:
没限制

400 人已下载 手机查看

//+——————————————————————+
//|sltp-currency.mq4 |
//|Desmond Wright aka ” Buju” |
//|notes: |
// this EA will use the deposit currency as stop loss and take profit|
// for each trade. It does NOT use pips to measure values. |
// Once profit or loss has been reached it will close the entire trade|
// |
//+——————————————————————+
#property copyright “Desmond Wright aka Buju”
#property link “”

//+——————————————————————+
//| expert initialization function |
//+——————————————————————+
extern double stop_loss=8; // stop loss input in currency
extern double take_profit=5; // take profit input in currency
int i;
int ticket;

int start() { //start of prog

if(OrdersTotal() !=0) // if total orders are not zero
{
int total = OrdersTotal(); // the word total represents total orders

for(i = total – 1; i >= 0; i–)// count each order backwards
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES); //select each order by postiton

if(OrderSymbol() != Symbol()) continue; //if it is not equal to our symbol, skip it

if((OrderType() == OP_BUY) || (OrderType() == OP_SELL))
{

//—– order profit —————–
if(OrderProfit() >= (take_profit)) // OrderProfit is measured in the deposit currency – not pips
OrderClose(OrderTicket(),OrderLots(),Ask,3,White);
}
{
//—– end order profit —————–

//—– order stop —————–
if(OrderProfit() <= -(stop_loss))
OrderClose(OrderTicket(),OrderLots(),Ask,3,White);
//—– end order stop —————–

Comment (“Take Profit ” ,take_profit ,” Stop Loss ” ,stop_loss);
}
}
}
}

 

 

如果你对文件有了解,请帮助投票!

If you are familiar with the file, please help vote!

平均评分 0 / 5. 投票数: 0

到目前为止还没有投票!成为第一位投票人。

相关资源

暂无评论

none
暂无评论...