This code won't even compile. If you really want help insert your code in Meta Editor, compile, then fix it.
Then press Styler and then use <\> button to post the whole corrected code because nobody will help you like this.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I been sending the following request to close a position but it the print_statement keeps returning NONE. what can i do please.
if pos.ticket == ticket:
request ={
'action':mt.TRADE_ACTION_DEAL,
'position':ticket,
'type':0,
'price':tick.ask,
'symbol':pos.symbol,
'deviation':50,
'volume':volume,
'comment':'your position with the ticket has been closed',
'type_time':mt.ORDER_TIME_DAY,
'type_filling':mt.ORDER_FILLING_FOK,
}
closed_position = mt.order_send(request)
print( closed_position )