today happened something weird in my opinion. A script of mine (IOG enabled) uses entryprice reserved word to calculate profit target, StopLoss and TrailingStop.
I did these calculations in IOG since I realized that my broker API doesn't understand or doesn't transmit correctly the appropriate PowerLanguage commands like setstoploss or setprofittarget or setpercenttrailing. Of course in backtest phase everything runs perfectly but this morning my signal has had for the first time a real test bech. Fortunately I activated the print() statement to follow all variables in my script during the "live" execution. So the entry has been made successfully as expected in the chart but after this I noticed in the PLE output that entryprice() proceeded with a value 0 instead of the real entry price... so I spent the whole day to follow by myself the market fluctuations and then I decided to exit manually. After the "live" session, I ran again the script and... surprice!!!
![Surprised :o](./images/smilies/icon_surprised.gif)
As I read contrasted opinions in this forum I repeat the question: in Autotrading mode (SA or AA) does entryprice only return the entry price calculated by the strategy on the chart or it is the real and filled price from the broker?
![Question :?:](./images/smilies/icon_question.gif)
Do you have some experience in using the entryprice in your signal and do you know its limits?
Thank you,
auato