Forum

SymbolInfoDouble(symbol_1, SYMBOL_BID) and SymbolInfoDouble(symbol_1, SYMBOL_ASK) return 0

When i use two code below, i get zero (0) return. I using it in OnTimer: double bid = SymbolInfoDouble (symbol_1, SYMBOL_BID ); double ask = SymbolInfoDouble (symbol_1, SYMBOL_ASK ); This is my full code: void Make_Type_4( string symbol_1, double vol, string type_comment, int type_buy_sell, double

Error 136 (ERR_OFF_QUOTES) when trailing stop with OrderModify

Hello community, I have a problem: When i trailing stop, sometimes i get error 136 (ERR_OFF_QUOTES). Example: Case AAPLm (Apple stock). But In most cases it works fine. Is there any error in my code or is this just my forex broker error? I am using exness broker, demo

Ask and Bid price

Hello, i want to write code to solve problem: Input the price and order buy or sell it. But it wrong because some case ( Most of buy). And i think add bid and ask price. So i write the code: First, this is code not add bid-ask price: //Val == 1 is sell, val==2 is buy //And sl is in input. if (val ==

Comment long string in OrderSend

In Ordersend i want to pass a long string to the funtion. Ex: SELL=4234=0.89234=0.85000002=0=0 But when i send this string to function Ordersend then the string not show and save: I think it is long string. I want to pass it to function. Do anyone has solution

Caculator Point (not pip, 1 pip = 10 point) between 2 prices

Hello, i want to caculator point between 2 prices. Example: i want to caculator point between 2 price: 0.66980 and 0.67100 in AUDUSD, or 27114.32 and 27042.34 in BTCUSD. Can you give me the code to solve this problem? Thank you. (Function is better)