Scripts: ProfitOnDrop

 

ProfitOnDrop:

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

Author: Matus German

 
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.
 
Nice work, instead could make an indicator line which can be dragged on chart to see profits at various levels/prices.
 
         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. 
 
this version works correctly:
Files:
Reason: