-
Notifications
You must be signed in to change notification settings - Fork 35
unable to unset stop loss #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Dear Sir , hope this email found you well I hope this email finds you well. I am writing to provide feedback and report several persistent issues encountered while implementing your PyTrader API for MT4/MT5 connectivity. We've been working on a Forex data collection system, and I wanted to share our findings to help improve the API. Key Issues Encountered:
Suggested Improvements:
We have implemented various workarounds for these issues, but addressing them at the API level would greatly improve the user experience. I would be happy to provide more detailed information or test cases if needed. Current Workarounds Implemented: # Example of our current workaround for data format inconsistency
def parse_rates(raw_response):
if isinstance(raw_response, str):
# Handle string format with $ delimiter
return [tuple(map(float, row.split('$'))) for row in raw_response.split(';')]
return raw_response # Assume list format Would you be interested in our complete test suite that demonstrates these issues? We'd be happy to contribute to improving the API's reliability and usability. Thank you for your time and consideration. Best Regards |
First of all thank you for your comments. At the moment i'm working on an update of the Pytrader_API for several reasons. I have to say documentation is rather old and not all OK. Also on that i'm working. I did already a lot of refactoring the code. Best regards |
Hi Sedik, Some answers on your remarks. I assume you do not use the last version or not the same versions for EA and pytrader_api. It is always pytrader_api asks and the EA gives an answer. Get_last_x_bars_from_now() gives always np.array as result. But if you specific improvements we can always talk. Version 4.01 will be posted very soon. Better documentation. Best regards, |
All functions have this kind of documentation at hoovering:
|
Dear Sir many many thanks for your detailled replay actually im using some AI for new project , first step to collect data via pytrader so we face issue mentioned in the email , we will go back with your informative details and optimistic that it will work , also waiting for version 4.
Best regards
Sedik
…________________________________
From: Emonts ***@***.***>
Sent: Friday, April 11, 2025 11:25 AM
To: TheSnowGuru/PyTrader-python-mt4-mt5-trading-api-connector-drag-n-drop ***@***.***>
Cc: Sedik7 ***@***.***>; Comment ***@***.***>
Subject: Re: [TheSnowGuru/PyTrader-python-mt4-mt5-trading-api-connector-drag-n-drop] unable to unset stop loss (Issue #64)
Hi Sedik,
Some answers on your remarks.
I assume you do not use the last version or not the same versions for EA and pytrader_api.
The Get_last_tick_info() is already a very long, long time in the pytrader_api.
The Symbol_select_tick() function is never coded, so can not be avaialable.
It is always pytrader_api asks and the EA gives an answer.
So automatic reconnecting would be an exception.
It then also ca happen because of automatic reconnection as user you would not notice that there is something not wel working.
pytrader_api has a Check_connection() function.
Reset of error states is now done
For the results of the different function we have:
. np.array
. dataframe
. dictionairy
This is a matter of taste, one likes more lists, on other dataframe, again another ....
Get_last_x_bars_from_now() gives always np.array as result.
It is strange to me that you see any ^,#,$ in the result of a function call.
But if you specific improvements we can always talk.
Version 4.01 will be posted very soon. Better documentation.
Best regards,
Branly
—
Reply to this email directly, view it on GitHub<#64 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWX6LOYD5Z6P4RHGUGF72C32ZACKZAVCNFSM6AAAAABUVPBOGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOJXG4ZDOOBRHE>.
You are receiving this because you commented.Message ID: ***@***.***>
[https://avatars.githubusercontent.com/u/64263524?s=20&v=4]Branly76 left a comment (TheSnowGuru/PyTrader-python-mt4-mt5-trading-api-connector-drag-n-drop#64)<#64 (comment)>
Hi Sedik,
Some answers on your remarks.
I assume you do not use the last version or not the same versions for EA and pytrader_api.
The Get_last_tick_info() is already a very long, long time in the pytrader_api.
The Symbol_select_tick() function is never coded, so can not be avaialable.
It is always pytrader_api asks and the EA gives an answer.
So automatic reconnecting would be an exception.
It then also ca happen because of automatic reconnection as user you would not notice that there is something not wel working.
pytrader_api has a Check_connection() function.
Reset of error states is now done
For the results of the different function we have:
. np.array
. dataframe
. dictionairy
This is a matter of taste, one likes more lists, on other dataframe, again another ....
Get_last_x_bars_from_now() gives always np.array as result.
It is strange to me that you see any ^,#,$ in the result of a function call.
But if you specific improvements we can always talk.
Version 4.01 will be posted very soon. Better documentation.
Best regards,
Branly
—
Reply to this email directly, view it on GitHub<#64 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWX6LOYD5Z6P4RHGUGF72C32ZACKZAVCNFSM6AAAAABUVPBOGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOJXG4ZDOOBRHE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I'm trying to implement a method to unset SL but i receive back
order_error
"1" /order_return_message
"Error in modify").This is what i'm doing:
success = MT.Set_sl_and_tp_for_position( ticket = ticket ,stoploss = 0 ,takeprofit = position['take_profit'] )
whereposition['take_profit']
is the actual take profit already set on the position.Testing with
stoploss
values grater than actual entry (position is a sell), succeedsThe text was updated successfully, but these errors were encountered: