Download MetaTrader 5

Scripts: ProfitOnDrop

To add comments, please log in or register
All activity at MQL5.community is clearly visible. Have a look at the Wall!
MetaQuotes Software Corp.
Moderator
181065
MetaQuotes Software Corp. 2012.08.17 09:19 

ProfitOnDrop:

Calculates the profit from oppened trades if the Price reaches the dropped Price

Author: Matus German

Pankaj Bhaban
1893
Pankaj Bhaban 2012.09.11 05:53  
Can you instead make it like indicator line which can be dragged over chart can would calculate the final profit/loss from all open trades.
Pankaj Bhaban
1893
Pankaj Bhaban 2012.10.10 18:55  
Nice work, instead could make an indicator line which can be dragged on chart to see profits at various levels/prices.
Bambang Sugianto
10224
Bambang Sugianto 2013.01.01 04:20  
         if(OrderType()==OP_BUY)
            profit+=(targetPrice-OrderOpenPrice())/point*MarketInfo(Symbol(),MODE_TICKVALUE)*OrderLots()+OrderSwap();
         if(OrderType()==OP_SELL) 
            profit+=(OrderOpenPrice()-targetPrice)/point*MarketInfo(Symbol(),MODE_TICKVALUE)*OrderLots()+OrderSwap();

will be more proper. 
To add comments, please log in or register