OrderOpenPrice( ) : Is this the Current Price of an Open Trade OR the Price that the Trade was Opened at ?

 
The Subject covers this: OrderOpenPrice( ) : Is this the Current Price of an Open Trade OR the Price that the Trade was Opened at ?
 
What makes you suspect that it could be the current price despite the very descriptive name OrderOpenPrice() that perfectly describes what it does?
 

7bit I suspect Doug is thinking OrderOpenPrice == the price of the currently open order (versus a closed order). Which of course it is not, but I'm just saying there is prolly an easy explaination of the logic behind the question.

Doug it is the price at which the order was opened at. Current price of the open trade is the market price, naturally, or if the order has been closed then there is no current price.

 
1005phillip:

7bit: What makes you suspect that it could be the current price despite the very descriptive name OrderOpenPrice() that perfectly describes what it does?

7bit I suspect Doug is thinking OrderOpenPrice == the price of the currently open order (versus a closed order). Which of course it is not, but I'm just saying there is prolly an easy explaination of the logic behind the question.

7bit: 'Open' is quite commonly spoken of, termed and labeled as and referring to trades that are currently 'open' and actively trading. Hence this is what 'made me suspect' and as such that it could be interpreted that way.

Just as you say Phillip: the way it is stated, it could quite readily be both, hence the question.

Thanks

 
FourX:

7bit: 'Open' is quite commonly spoken of, termed and labeled as and referring to trades that are currently 'open' and actively trading. Hence this is what 'made me suspect' and as such that it could be interpreted that way.

But there is only one current price, the price that is visible in the chart. Why should it be a function of an open order?


Did you know that there is documentation available for every built in function? In MetaEditor if you have written the word OrderOpenPrice simply press F1 while the caret is still somewhere inside this word and you will immediately get documentation along with a small example popping up in the help window for this specific function. This works for every built in function. For OrderOpenPrice() it reads:


double OrderOpenPrice( )
Returns open price for the currently selected order.
Order must be first selected by the OrderSelect() function.
Sample:
  if(OrderSelect(10, SELECT_BY_POS)==true)
    Print("open price for the order 10 ",OrderOpenPrice());
  else
    Print("OrderSelect returned the error of ",GetLastError());
 

7bit:

In MetaEditor if you have written the word OrderOpenPrice simply press F1 while the caret is still somewhere inside this word and you will immediately get documentation along with a small example popping up in the help window for this specific function.


Ha, I never knew that... I can't tell you how many times I've gone to search, re typed the word, searched through the results to finally find the page that F1 takes me to in an instant... I'll slowly get my life back with this :) (on the assumption I had one to begin with!)

V

 
Viffer:

Ha, I never knew that... I can't tell you how many times I've gone to search, re typed the word, searched through the results to finally find the page that F1 takes me to in an instant... I'll slowly get my life back with this :) (on the assumption I had one to begin with!)

V

Other useful shortcuts:

ctrl + space to initiate the auto-complete list

ctrl + shift + space when inside function call parenthesis to activate the call-tips

 
Viffer:

Ha, I never knew that... I can't tell you how many times I've gone to search, re typed the word, searched through the results to finally find the page that F1 takes me to in an instant... I'll slowly get my life back with this :) (on the assumption I had one to begin with!)

V


also just press the ESC key and that help screen that came up when you pressed F1 goes away, giving you back your LCD realestate for programming.

 

This took an unexpected turn :)

I'll throw mine ... you can drag include or library name directly from Files window (Ctrl + D) to your code. Relieving you from typing the name & brackets.

Reason: