Forum

profit loss calculation for 1 lot with different brokers

For 1 lot in EURUSD a broker is calculating 1 USD profit or loss and another broker is calculating 10 USD on 1 pip (10 points) change. Can i get this difference using tick value

Looping difference confusion

Since a long time i am using (1a) for ( int i= OrdersTotal ()- 1 ; i >= 0 ; --i) // Suggested by most of the experts for looping through orders, but whenever i come to forum for some guidance i often find that people are using (1b) for ( int i= 1 ; i<= OrdersTotal (); i++) // from the documentation

Symbol name issue in EA

I developed an EA for EURUSD only and it is working exactly as expected on some brokers. but when i tried it on exness, it started generating errors because of EURUSDm there. i do not want to use a user input field for currency pair selection. how can i resolve this issue

datetime to unix

is there any way of converting datetime to unix time with property strict

char in comment

int start() { string char [ 256 ]; int i; for (i = 0 ; i < 256 ; i++) char [i] = CharToStr(i); Comment ( /* Copyright © 2009, Sergey Kravchuk*/ char [ 67 ] + char [ 111 ] + char [ 112 ] + char [ 121 ] + char [ 114 ] + char [ 105 ] + char [ 103 ] + char [ 104 ] + char [ 116 ] +

Unable to understand the difference

Block 1 int trades_count(){ int trades_counts_var= 0 ; for ( int i= 0 ; i< OrdersTotal (); i++){ if ( OrderSelect (i,SELECT_BY_POS,MODE_TRADES)== false ) break ; if (OrderSymbol()== Symbol () && OrderMagicNumber()==MagicNumber){ if (OrderType()==OP_BUY)

Unable to understand this piece of code

while ( true ) { RefreshRates(); ticket= OrderSend (...); if (ticket> 0 ) // this can be true only if ordersend is successful? { Print ( "order placed successfully" ); // a message is printed then break ; // and loop breaks err=

help needed for using StringToUpper

With property strict extern string MyPair = "eurusd" ; string xyz = StringToUpper (MyPair); // gives warning: implicit conversion from 'number' to 'string' But in some function body... void DoBreakEven( int BP, int BE){ StringToUpper (MyPair); // no warning // ... } and string SetCase() {

About property strict

For EA, when i should use property strict and when i should not use it? PS: What is recommended by a programmer

Bid, Ask and spread is not changing on every tick on chart by my EA

Asalam o Alykum, In my EA I am using below code line to display bid, ask, spread on chart... Comment ( StringFormat ( "Buy at = %g\nSell at = %g\nSpread is = %g" ,nBid,nAsk,nSpr)); The problem is that it updates bid and ask prices only when new candle starts. Please guide me, how can I correct