Forum

SendNotification() throws "function is not allowed for call"

I use the SendNotification() function a couple of times within my code but it throws the error "function is not allowed for call" at only one place within the code. The function throws this error in a function which I use to detect a new day. I new day could start before the actual trading time

function ObjectGetTimeByValue throws error 4204 for horizontal OBJ_TREND line

Good morning, I use ObjectGetTimeByValue to receive the start/first date for OBJ_TREND objects. For just one object the function throws the error 4204. This object is a horizontal trend line having, apparently, the same price for both ends of the line. I think that the function ObjectGetTimeByValue

Issues with stop loss at Exchange (NASDAQ) trading stocks using PositionClose() and CTrade -> Sell() function

Ciao, I have an EA which trades physical stocks at NASDAQ on a live account. Apart from the normal trading hours, there are pre and after hours. At these pre and after hours the spread between bid and ask is extremely high and often very far away from the latest price at normal opening hours. When I