-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ATH > Restricted price INGORED! #533
Comments
@peweb It's usually happening the following scenario.
|
Cant get it. Why will buy it above the ATH? We have ATH say of 100 with 5% limit so grid 2 should be placed at 95 max, right? I think the bot ignores restriced price if we change % while it is working. Can it be? |
It depends on your configuration. If you see the code to check ATH restriction, it's checking in the determine action step. However, if the coin price reaches the next grid trade trigger price and couldn't trigger because of TradingView recommendation, then it will override the action, which means it won't check the ATH restriction price. That is how it is working at this moment.
1st grid trade will be always respected the ATH restriction price because there is no override action. I hope I answered your question. If I've answered your question, please close the issue. |
I will close the issue. Feel free to reopen if you still have a question. |
Version
v0.0.93 (26a1edc)
Description
Just filled G2 at 1511.26 while ATH restricted price is 1435.49
{
"_id": "635b6d0ebad4d661ee643c28",
"symbol": "ETHUSDT",
"msg": "The last order has been updated. 11419066473 - BUY - FILLED",
"loggedAt": "2022-10-28T05:47:58.272Z",
"data": {
"jobName": "trailingTrade",
"correlationId": "25e6b97c-0084-4c45-a329-eb697b2ea501",
"lastOrder": {
"symbol": "ETHUSDT",
"orderId": 11419066473,
"orderListId": -1,
"clientOrderId": "Ot6p6t1g7tYqFjUFOdAHMJ",
"transactTime": 1666936078140,
"currentGridTradeIndex": 1,
"status": "NEW",
"type": "STOP_LOSS_LIMIT",
"side": "BUY",
"stopPrice": "1511.10000000",
"price": "1511.26000000",
"origQty": "0.01720000",
"cummulativeQuoteQty": "0.00000000",
"executedQty": "0.00000000",
"isWorking": true,
"updateTime": 1666936078141
},
"updatedOrder": {
"symbol": "ETHUSDT",
"orderId": 11419066473,
"orderListId": -1,
"clientOrderId": "Ot6p6t1g7tYqFjUFOdAHMJ",
"transactTime": 1666936078140,
"currentGridTradeIndex": 1,
"status": "FILLED",
"type": "STOP_LOSS_LIMIT",
"side": "BUY",
"stopPrice": "1511.10000000",
"price": "1511.26000000",
"origQty": "0.01720000",
"cummulativeQuoteQty": "25.99195200",
"executedQty": "0.01720000",
"isWorking": false,
"updateTime": 1666936078141
}
}
}
{
"_id": "635b63a4bad4d661ee643547",
"symbol": "ETHUSDT",
"msg": "The current price reached the trigger price for the grid trade #2. Let's buy it.",
"loggedAt": "2022-10-28T05:07:48.075Z",
"data": {
"helper": "queue",
"jobName": "trailingTrade",
"correlationId": "13fc04ac-b52e-4563-b6f5-5f12b020d21d",
"stepName": "determine-action",
"data": {
"symbol": "ETHUSDT",
"isLocked": false,
"featureToggle": {
"notifyOrderConfirm": false,
"notifyDebug": false,
"notifyOrderExecute": true
},
"lastCandle": {
"eventType": "24hrMiniTicker",
"eventTime": 1666933667876,
"symbol": "ETHUSDT",
"close": "1504.88000000"
},
This is for G1 filled at 1520.34
{
"_id": "635b239ba1027656be29a4e2",
"symbol": "ETHUSDT",
"msg": "The buy order of the grid trade #1 for ETHUSDT has been executed successfully.",
"loggedAt": "2022-10-28T00:34:35.863Z",
"data": {
"helper": "queue",
"jobName": "trailingTrade",
"correlationId": "2ead7c8d-2420-475c-836a-52b20c835649",
"stepName": "ensure-grid-trade-order-executed",
"side": "buy",
"order": {
"symbol": "ETHUSDT",
"orderId": 11416325644,
"orderListId": -1,
"clientOrderId": "Jmuylmrd6BVodS4bAf6XJE",
"transactTime": 1666917275123,
"currentGridTradeIndex": 0,
"status": "FILLED",
"type": "STOP_LOSS_LIMIT",
"side": "BUY",
"stopPrice": "1520.18000000",
"price": "1520.34000000",
"origQty": "0.01310000",
"cummulativeQuoteQty": "19.91435800",
"executedQty": "0.01310000",
"isWorking": false,
"updateTime": 1666917275123
}
}
}
To Reproduce
The ATH restriction was set at -5% and I changed it to -10% before G1 buy execution but it was ignored and G1 was bought above the new restricted price.
ATH = 1594.99
-5% ATH = 1,515.2405
-10% ATH = 1,435.49
Now I the bot is going to execute G3 at 1499.91 - above the restricetd price 1,435.49 in the frontend.
I dont know why G1 was fileld at 1520.34 above the -5% ATH restricted price.
Expected Behaviours
Bot should respect the current ATH restricted price no matter when it is set or changed. Marekt is dinamic and we need to be able to ajust the bot behavior.
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: