Dear brazandeh
every position consist of two orders at least, ex. the
"Buy position" began with oder the broker to BUY specific Asset (now you
acquire-have-this asset),
then you decide to eliminate this asset
-regardless that you see that it gain enough profit or you don't want more
losses-;So you give the broker the oder to redeem it (Close), now the broker
will get your Asset (position) and sell in in the Market
he will sell it
in the market at Bid price
conclusion :
Buy order is settled at ASK
price
Close Buy order settled at Bid price
Sell order is settled in
the market at BID price
Close Sell order settled in the market at ASK
price
And there is no differences between Jforex and MQL concepts
(this story happened to me with MT4, when i was in sell position with takeProfit, i was observe the chart when the price reached just TP and returned up again without close my position , and i call the broker ask him about this issue, then he told me that 1st the price you see in chart is the Bid price, 2nd the Ask price is greater than Bid by the Spread, So what i saw was a fake price and the settled priced (ASK) is hide in background; witch wasn't reach to my TP yet )
I hope it's clear to understand, and there is more Tricks but i like to keep it simple.
And i am sorry to reopen this thread but it was the Google result.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Am a newbie in Forex programming,so I have some doubts in Forex programing.I am learning MQL4,MQL5,and Jforex at the same time.I've almost done with MQL4.
Sine I've been using C#,JAVA,VB.net for a long time,I'd rather start with MQL5
and JForex as they are object oriented languages,but I've found this site very active with lots of experts .
I've seen in many sites the following codes for executing a buy or sell order:
So if the above code has been accepted by the experts,the logic should be coded as :but what has been used in DukasCopy was different for the Takeprofit.
the API supporter whose knowledge is extensive in my opinion,insisted in that the takeprofit should be as follows:
and here is his/her reason:
Please,I really need your knowledge.I've already had a private message with WHRoeder,but since I believe the issue could also be useful for other beginners,I've decided to bring it on here.go to platform and make a manual order on a tick chart with close SL and TP values (say 2 pips) and you will clearly see that both TP and SL get executed by the same offer side (i.e. either by BID or ASK). You can also manually move the SL and TP lines to check that this is the case.
For those of you who are interested in whole conversation here is the link