VitalySvyatyuk / pocket_option_trading_bot

Bot for autotrade in Pocket Option
30 stars 19 forks source link

Martingale trading in po_bot_indicators.py #11

Open KrisSzyp opened 1 month ago

KrisSzyp commented 1 month ago

It works nicely, but can you provide the code that would need to be pasted to make Martingale trading work like in the po_bot.py file? Thank you in advance. And the question is, I tried to create such a setting if quotes[-1].close < psar[-1].sar and quotes[-2].close < supertrend[-2]: do_action('put') if quotes[-1].close > psar[-1].sar and quotes[-2].close > supertrend[-2]: do_action('call') but it doesn't work for me, the point is that if these two conditions are met, it should only place the transaction. The good thing about this bot is that if you change the currency, if it drops below 92% and the Martingale, you could add it and if you don't want to use it, you set the multiplier to 1 and it wouldn't work. Also let me know if this address BTC is ok bc1qemxzzy6rq6ycxjn0f00yqgptjqldkms8g2ucu0

Job well done. @VitalySvyatyuk

VitalySvyatyuk commented 1 month ago

This btc address is good. Your condition can be if quotes[-1].close < psar[-1].sar and quotes[-1].close < supertrend[-1]: You can test with simplified condition: quotes[-1].close < supertrend[-1]:

VitalySvyatyuk commented 1 month ago

No, Martingale is not used in po_bot_indicators. This file is mostly for strategies testing. Just write your wise condition and test the performance. If you have profitability > 51%, then you can move such strategy to the po_bot.py for Martingale approach.

KrisSzyp commented 1 month ago

if quotes[-1].close < psar[-1].sar and quotes[-1].close < supertrend[-1]

I get image he not get any transaction. @VitalySvyatyuk

KrisSzyp commented 1 month ago

No, Martingale is not used in po_bot_indicators. This file is mostly for strategies testing. Just write your wise condition and test the performance. If you have profitability > 51%, then you can move such strategy to the po_bot.py for Martingale approach.

Can you show me how to transfer, for example, PSAR to Martingale, because I'm testing it and I see that with marginale I would have better results? In 7 hour i get 1 $ to transaction and i get 30 $ profit 1$ to 1 signal PSAR with assumption image The largest margin would be 4, so I would like to test it. @VitalySvyatyuk

VitalySvyatyuk commented 1 month ago

you have to use supertrend[-1].upper_trend or .lower_trend as mentioned here: https://python.stockindicators.dev/indicators/SuperTrend/#content So, for PUT use: if supertrend[-1].upper_trend:

KrisSzyp commented 1 month ago

if quotes[-1].close < psar[-1].sar and quotes[-1].close < supertrend[-1]

I get image he not get any transaction. @VitalySvyatyuk

If i get this image a have 0 transaction on this paramter image when i delete and get only image get transaction . Why ? @VitalySvyatyuk

VitalySvyatyuk commented 1 month ago

I moved PSAR strategy to the po_bot.py, and made it in kris branch. Use this code from here: https://github.com/VitalySvyatyuk/pocket_option_trading_bot/blob/kris/po_bot.py

KrisSzyp commented 1 month ago

I moved PSAR strategy to the po_bot.py, and made it in kris branch. Use this code from here: https://github.com/VitalySvyatyuk/pocket_option_trading_bot/blob/kris/po_bot.py

Thx. image

KrisSzyp commented 1 month ago

if quotes[-1].close < psar[-1].sar and quotes[-1].close < supertrend[-1]

I get image he not get any transaction. @VitalySvyatyuk

If i get this image a have 0 transaction on this paramter image when i delete and get only image get transaction . Why ? @VitalySvyatyuk

You can take a look because it still doesn't work when I run PSAR and SUPERTREND @VitalySvyatyuk

KrisSzyp commented 1 month ago

In your py_bot on PSAR he open a transaction when image the candle will break the PSAR and not at the end of the candle, this means that the candle, for example, returns and the PSAR does not change, and there is already a transaction, it can be changed at the end of the candle.

Can I make them available for 10s, 15s, 30s or at least 1 minute?