nicolasxu
nicolasxu
nicolasxu
Added topic PositionGetDouble(POSITION_PRICE_CURRENT) and SymbolInfoTick(targetSymbol,lastTick);
If I had a position on "EURUSD", there are 2 ways to get current price.  1) PositionSelect("EURUSE")     then call  PositionGetDouble( POSITION_PRICE_CURRENT ) 2)   SymbolInfoTick("EURUSD",lastTick);   My question
nicolasxu
Added topic Why there are OnTrade() and OnTradeTransaction() event handler?
Why there is a need for two trade event handlers?   I read the difference here:  https://www.mql5.com/en/docs/runtime/event_fire#trade But I stilll can't fully comprehend the difference, since: 1) They overlap each other on handling same
nicolasxu
Added topic Compile using console command?
Is there any console command that can compile the mq5 file? For example:  "mql5 -compile ./strategy101.mq5 ./strategy101.ex5" If so, I can use other code editors such as sublime text for development by setting a build environment.  The
nicolasxu
Added topic What is the difference between "current order" and "current pending order"?
OrdersTotal Returns the number of current orders . int   OrdersTotal (); Return Value Value of the  int  type. Note Do not confuse current  pending orders  with positions, which are also displayed on the "Trade" tab of
nicolasxu
Added topic What is session exactly? Where can I find session index?
From this picture, I can see FX market is 24 hours, 5 days a week for both trading and quoting activities. Does it mean there is only one session in a day? Another conflicting info I heard is there are 3 sessions, Europe session, US session and Asia
nicolasxu
Added topic Only one timer is allow in one Expert Advisor
https://www.mql5.com/en/docs/eventfunctions/eventsettimer From the doc, I can see there is no timer ID. No way to tell which is which, so there is only one timer is allowed in each EA
nicolasxu
Added topic Calculate the daily difference between highest price and lowest price, how to?
I have a simple task: Calculate the daily difference between highest price and lowest difference and print the result in the console.     So far I can only successfully do: void OnTick() { //--- SymbolInfoTick("EURUSD", tickInfo);
nicolasxu
Registered at MQL5.community
12