Forum

[HELP] Need calculate Stochastic oscillator using pyhton

Hi everyone, I'm trying to calculate Stochastic 5 3 3 oscillator using python but the result is different from chart MT5. Please help. My code below def calculate_stochastic_oscillator(df): df['low_min'] = df['low'].rolling(window=5).min() df['high_max'] = df['high'].rolling(window=5).max()

[MT5 auto place an Buy order when i do nothing

Hi everyone, I'm trying to use Python for automatic trading (Demo account), but I found that MT5 Auto places a Buy order when I do nothing. And only one time when start Here is my code, only initialize, nothing else import MetaTrader5 as mt mt.initialize() symbol = 'XAUUSD' while True

[HELP] Difference from RSI calculated by Python and RSI show on Chart MT5

Hi all, As tittle, im trying calculate rsi using python follow this code: # Calculate RSI window_rsi = 14 delta = df [ 'close' ]. diff () gain = ( delta . where ( delta > 0 , 0 )). rolling ( window = window_rsi ). mean () loss = ( - delta . where ( delta < 0 , 0 )). rolling ( window