Order Close/Open this Bar
2件の返信
こんにちは,
to me it seems as if the function ‘Order Close (Open) this bar’ returns also the value of pending orders.
How can i get only the value of a real order opening (closing) and not of pending orders?
Cezar
0
Hi Cezar,
you are right, it counts also pending orders.
To make it behave differently you can do it by using a custom function and then define this function in /code/CustomFunctions.mq4
The custom function can use the same logic as sqOrderOpenedThisBar()/sqOrderClosedThisBar(),
but with a check if OrderProfit() > 0 or if OrderType() == OP_BUY || OP_SELL
マーク
マーク
StrategyQuantアーキテクト
0
Thanks mark, I will test it at the weekend.
0
2件の返信を表示中 - 1 - 2件目 (全2件中)