0% found this document useful (0 votes)
7 views1 page

Trii

Uploaded by

tobishuaibu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Trii

Uploaded by

tobishuaibu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#!

/bin/bash

# Function to simulate data fetching from MT5 with custom input


simulate_data_fetch() {
local metaquote_id=$1
local trade_pair=$2

while true; do
# Simulate log message output with MetaQuote ID and Trade Pair
echo -e "\e[32m[INFO] MetaQuote ID: $metaquote_id\e[0m"
echo -e "\e[34mTrade Pair: $trade_pair\e[0m"
echo -e "\e[33m[STATUS] Signal Generating...\e[0m"

# Random sleep interval between fetches


sleep $((RANDOM % 5 + 2))

# Check if "q" is pressed to quit


read -t 0.1 -n 1 input
if [[ "$input" == "q" ]]; then
echo -e "\e[31m[EXIT] Stopping MT5 bot...\e[0m"
break
fi
done
}

# Function to display loading animation


loading_animation() {
local pid=$1
local delay=0.1
local spinstr='|/-\'
echo -n "Starting MT5 Bot "
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do
local temp=${spinstr#?}
printf " [%c] " "$spinstr"
local spinstr=$temp${spinstr%"$temp"}
sleep $delay
printf "\b\b\b\b\b\b"
done
echo ""
}

# Main function to start simulation


main() {
# Ask for MetaQuote ID and Trade Pair input
echo -n "Enter your MetaQuote ID: "
read metaquote_id
echo -n "Enter your Trade Pair (e.g., EURUSD): "
read trade_pair

# Start loading animation


sleep 1 &
loading_animation $!

# Simulate MT5 environment with the provided inputs


simulate_data_fetch "$metaquote_id" "$trade_pair"
}

# Execute the main function


main

You might also like