MQL4 - automated forex trading   /  

Code Base

Code Base  Indicators  JJN-TradeInfo To post a new code, please log in or register

Download MetaTrader 5 and visit MQL5.community Code Base
and Trade on the Go!
Prepare for the Championship
Couldn't find the right code? Order it in the Jobs section

This library is for
MetaTrader 4
Download MT 4 - 455 Kb

and Trade on the Go!

Name:
JJN-TradeInfo
Author: ggekko (2011.04.11 10:04)
Downloaded: 3752
Download:
 JJN-TradeInfo.mq4 (5.8 Kb) View


Indicator that shows profits and losses (in pips and money).

I use PosX and PosY, because I like it better than Corner. 

Sorry, no picture at this moment. 


2 comments  To post a new comment, please log in or register

Hi Traders,

There is a little mistake in the code. Please, change this:

         double Faktor;
         int Is_JPY=StringFind(Pairs[h],"JPY",0);
         if(Is_JPY==-1) Faktor=Point*10;
         else Faktor=Point*1000;
         if(ordertype==0) DataVal[h][0]=(CurrentPrice-OrderOpenPrice())/Faktor;
         else if(ordertype==1) DataVal[h][0]=(OrderOpenPrice()-CurrentPrice)/Faktor;

To

         if(ordertype==0) DataVal[h][0]=(CurrentPrice-OrderOpenPrice())/MarketInfo(Pairs[h],MODE_POINT)/10;
         else if(ordertype==1) DataVal[h][0]=(OrderOpenPrice()-CurrentPrice)/MarketInfo(Pairs[h],MODE_POINT)/10;
Cheers




16.08.2011 18:31 ggekko

Here is a picture:

 

14.04.2011 13:39 ggekko