Skip to content

Commit

Permalink
refactor: merged changes from #44
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiiRepair committed Dec 3, 2023
1 parent d1ae285 commit f5dfe90
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
11 changes: 0 additions & 11 deletions example/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,27 +401,16 @@ async def get_signal_data():
client.close()


async def get_moving_average():
periods = 21
interval = "1m"
symbol = "AUDCAD=X"
await client.get_moving_average(symbol=symbol, interval=interval, periods=periods)
lastCandles = await client.get_last_candles(symbol=symbol, interval=interval)
print(lastCandles)


async def main():
# await get_balance()
# await get_signal_data()
# await get_payment()
# await get_candle()
# await get_candle_v2()
# await get_realtime_candle()
# await assets_open()
# await trade_and_check()
await strategy_random()
# await balance_refill()
# await get_moving_average()


def run_main():
Expand Down
9 changes: 0 additions & 9 deletions quotexpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,15 +345,6 @@ async def start_mood_stream(self, asset, instrument="turbo-option"):
def close(self):
self.api.close()

async def get_moving_average(self, symbol, interval, periods):
# Obter os dados do par de negociação no intervalo desejado
data = yf.download(symbol, interval=interval, period="1d")

# Calcular a média móvel com o número de períodos especificado
data["Close_MA"] = data["Close"].rolling(window=periods).mean()

return data["Close_MA"]


logging.basicConfig(
filename=".quotexpy.log",
Expand Down

0 comments on commit f5dfe90

Please sign in to comment.