INNER CODE UNIT · Python

Indicator

Mo-Khalifa96/Forex-Trading-Bot · DataProcessing.py:22

def Indicator(df_rates_orig: pd.DataFrame):
    '''
    This function takes a dataframe with the candlesticks for a given symbol, applies the indicator or trading strategy 
    analysis, and returns back 3 key indicator variables:
            maximum: the indicator's green line,
            average: the indicator's orange line, &
            minimum: the indicator's red line. \n
    
    **Note, it processes up to next to last candle only.**
                                                           '''

    # Define empty lists for indicator variables 
    upper_lst, lower_lst, spt_lst, os_lst, max_lst, min_lst = [np.nan], [np.nan], [np.nan], [np.nan], [np.nan], [np.nan]

    #Preprocessing to prepare the variable lists!
    i = -500
    while i < 0:
        #Get the data to build the lists

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…