How to Calculate Profit/Loss percentage change

To add comments, please log in or register
mrwick
48
mrwick  

Hello, does anyone have a formula to calculate the change percentage as shown below? thanks


Files:
Capture.PNG 22 kb
Ehsan Tarakemeh
3621
Ehsan Tarakemeh  
mrwick:

Hello, does anyone have a formula to calculate the change percentage as shown below? thanks


(CurrentPrice - OpenPrice) / OpenPrice * 100
mrwick
48
mrwick  
Ehsan Tarakemeh:
(CurrentPrice - OpenPrice) / OpenPrice * 100
DoubleToString((((SymbolInfoDouble(_Symbol,SYMBOL_BID)-PositionGetDouble(POSITION_PRICE_OPEN)) / PositionGetDouble(POSITION_PRICE_OPEN)) *100), 2)

Thanks. Sample code above for anyone looking for this.

To add comments, please log in or register