Forum

Ctrade BuyLimit,BuyLimit Invalid order type error

Hello, i used to use CTrade class on Buy,Sell functions without any problems now i need to use BuyLimit,BuyLimit ,in the first of used i face error expedition time, I tried to fill the two inputs for the expiration code and I faced another error "CTrade::OrderTypeCheck: Invalid order type "

problem in my function "Oreders Total By MAGIC"

Hello, I have made this function to count the pending orders in the account it always return 0 int OredersTotalByMAGIC( int The_MAGIC) { int Counter = 0 ; for ( int i= OrdersTotal ()- 1 ; i>= 0 ; i--) { ulong ticket= OrderGetTicket (i); if ( OrderGetInteger ( ORDER_MAGIC ) ==

Problem with drawing indicators in mql5

Hello, A strange problem I am facing in drawing indicators in mql5 , I have not encountered this problem in mql4 The problem is when developing an indicator that draws lines on the chart, when the timeframe is changed, the lines are not erased in the old price position, and the chart appears poorly

pending orders number have limitation

Hello, I have made an ea depended on pending orders , the problem is it put only 30 pending orders, so I want to knew if there is a limitation to pending orders number. thanks

my source code is disappeared from my pc :(

Hello, my source code is disappeared from my pc ! I can't believe this could happen It happened before and I said it was a coincidence that will not be repeated Now open the source code file, which is completely empty If anyone has an idea to retrieve the source code because I worked a lot on this

Fill or Kill on a collection of symbols

I want to execute several orders in different symbols But I want it all done or nothing done Sometimes one of the orders is not executed because the market is closed or any other problem I hope to get suggestions to solve the problem

How to check if market is open per a specific symbol

Hello, i'm trying to find an direct function to check if the market is open or not peer specific symbol Thanks

How to trade on USDX if broker does not provide trading on it

Hello if may broker dosnot provide trading on USDX how can i trade on it this is the USDX Equation : USDX = 50.14348112 * the EUR/USD exchange rate ^ (-0.576) * the USD/JPY exchange rate ^ (0.136) * the GBP/USD exchange rate ^ (-0.119) X the USD/CAD exchange rate ^ (0.091) × the USD/SEK exchange

Oldest_Open_Price_Order

for sharing and improving double Oldest_Open_Price_Order( int Magic){ double open_price = 0 ; int TotalOrders = OrdersTotal (); for ( int x= 0 ;x<TotalOrders;x++){ OrderSelect (x,SELECT_BY_POS,MODE_TRADES); if (OrderMagicNumber() == Magic &&

last_closed_order_profit

for sharing and improving double last_closed_order_profit( int Magic){ double orderStopLoss; for ( int i= OrdersHistoryTotal() ;i >= 0 ;i--) { OrderSelect (i,SELECT_BY_POS,MODE_HISTORY); if (OrderMagicNumber() == Magic) break ; } return OrderProfit(); }