online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
from iqoptionapi.stable_api import IQ_Option import logging import time print("Connecting...") Iq=IQ_Option("[email protected]","000000000") # เปลี่ยนเมลและพาสเวิดด้วยน้าาาค้าบบบ^^ Iq.connect() Currency="EURUSD" BuyUP = 'call' BuyDOWN = 'put' Duration = 1 #----------MONEY SETTING-----------# Money / MoneyA / MoneyB เป็นจำนวนเงินออกออเดอร์ต้องตั้งค่าให้จำนวนเท่ากัน และมีจุดทศนิยมด้วยเช่น 1.00 Money = 1.00 # User money MoneyA = 1.00 # Robot money MoneyB = 1.00 # Realtime money MoneyP = 0.10 # MoneyP คือจำนวนเงินที่จะให้โรบอทเพิ่มขึ้นเองเมื่อสถานการณ์ได้เปรียบ #---------MATINGEL SETTING--------# มาติงเกลตั้งค่าตามต้องการ และต้องมีจุดทศนิยมด้วยเช่น 2.0 / 2.5 Matingel = 2.5 #--------ROBOT DATA BUY MODE-------# ส่วนนี้ไม่ต้องตั้งค่า RoundSW = 1 RoundUP = 0 RoundWIN = 0 RoundLOSS = 0 #------ ROBOT DATA MONEY MODE------# ส่วนนี้ไม่ต้องตั้งค่า RoundMONEY = 0.00 RoundMUP = 0 RoundMWIN = 0 RoundMLOSS = 0 size=60 maxdict=1 expirations_mode = 1 print("Start Robot...") Iq.start_candles_stream(Currency,size,maxdict) while True: realtime = Iq.get_realtime_candles(Currency,size) remaning_time = Iq.get_remaning(expirations_mode) purchase_time = remaning_time-30 for i in realtime: OpenA = realtime[i]['open'] CloseA = realtime[i]['close'] MaxA = realtime[i]['max'] MinA = realtime[i]['min'] VolumeA = realtime[i]['volume'] Type_candle = (OpenA)-(CloseA) if Type_candle<-0.0: if purchase_time<58 and purchase_time>3: # บอทจะทำการออกออเดอร์เฉเพาะ ต่ำกว่า 58 วินาที และมากกว่า 3 วืนาที เท่านั้น เพื่อลดปัญหาซื้อคร่อมเวลาซื้อขายของเซิฟเวอร์ _,id=(Iq.buy_digital_spot(Currency,MoneyB,BuyUP,Duration)) print('Robot Buy Mode = ',RoundSW) if id !="error": while True: check,win=Iq.check_win_digital_v2(id) if check==True: break if win==0: MoneyB = MoneyB print('Nothing : ',str(win)+' $') print('Round = ',RoundUP) print('-'*30) elif win<0: MoneyB = MoneyB*Matingel MoneyB = MoneyB RoundUP = RoundUP+1 RoundLOSS = RoundLOSS+1 RoundMUP = RoundMUP+1 RoundMLOSS = RoundMLOSS+1 print('You Loss : ',str('%.2f'%win)+' $') print('Round = ',RoundUP) print('-'*30) else: MoneyB = MoneyA RoundUP = RoundUP+1 RoundWIN = RoundWIN+1 RoundMUP = RoundMUP+1 RoundMWIN = RoundMWIN+1 print('You Win : ',str('%.2f'%win)+' $') print('Round = ',RoundUP) print('-'*30) else: print("please try again") elif Type_candle>0.0: if purchase_time<58 and purchase_time>3: # บอทจะทำการออกออเดอร์เฉเพาะ ต่ำกว่า 58 วินาที และมากกว่า 3 วืนาที เท่านั้น เพื่อลดปัญหาซื้อคร่อมเวลาซื้อขายของเซิฟเวอร์ _,id=(Iq.buy_digital_spot(Currency,MoneyB,BuyDOWN,Duration)) print('Robot Buy Mode = ',RoundSW) if id !="error": while True: check,win=Iq.check_win_digital_v2(id) if check==True: break if win==0: MoneyB = MoneyB print('Nothing : ',str(win)+' $') print('Round = ',RoundUP) print('-'*30) elif win<0: MoneyB = MoneyB*Matingel MoneyB = MoneyB RoundUP = RoundUP+1 RoundLOSS = RoundLOSS+1 RoundMUP = RoundMUP+1 RoundMLOSS = RoundMLOSS+1 print('You Loss : ',str('%.2f'%win)+' $') print('Round = ',RoundUP) print('-'*30) else: MoneyB = MoneyA RoundUP = RoundUP+1 RoundWIN = RoundWIN+1 RoundMUP = RoundMUP+1 RoundMWIN = RoundMWIN+1 print('You Win : ',str('%.2f'%win)+' $') print('Round = ',RoundUP) print('-'*30) else: print("please try again") #-----------ROBOT BUY MODE---------# if RoundUP >= 4: # เมื่อครบ 4 รอบ บอทจะทำการประมวลผล ถ้าแพ้มากว่าชนะ บอทจะเปลี่ยนโหมด ถ้าชนะมากกว่าแพ้ บอทจะเดินต่อไป print('*'*40) if RoundLOSS > RoundWIN: if RoundSW == 1: BuyUP = 'put' BuyDOWN = 'call' RoundUP = 0 RoundWIN = 0 RoundLOSS = 0 RoundSW = 2 elif RoundSW == 2: BuyUP = 'call' BuyDOWN = 'put' RoundUP = 0 RoundWIN = 0 RoundLOSS = 0 RoundSW = 1 else: RoundSW = RoundSW RoundUP = 0 RoundWIN = 0 RoundLOSS = 0 #------------ROBOT MONEY MODE---------# if RoundMUP >= 4: # เมื่อครบ 4 รอบ บอทจะทำการประมวลผล ถ้าชนะมากกว่าแพ้ บอทจะเพิ่มเงิน แต่ถ้าแพ้มากกว่าชนะ บอทจะลดเงินลงไปจุดเริ่มต้นใหม่ if RoundMWIN > RoundMLOSS: RoundMONEY = RoundMONEY+MoneyP RoundMONEY = RoundMONEY MoneyA = Money+RoundMONEY MoneyB = MoneyA RoundMUP = 0 RoundMWIN = 0 RoundMLOSS = 0 print('Money +') print('Robot Money = ',RoundMONEY) print('>'*40) elif RoundMLOSS > RoundMWIN: if win>0: RoundMONEY = 0.00 RoundMONEY = RoundMONEY MoneyA = Money+RoundMONEY MoneyB = MoneyA RoundMUP = 0 RoundMWIN = 0 RoundMLOSS = 0 print('Money -') print('Robot Money = ',RoundMONEY) print('>'*40) else: RoundMONEY = RoundMONEY MoneyA = Money+RoundMONEY MoneyB = MoneyA RoundMUP = 0 RoundMWIN = 0 RoundMLOSS = 0 print('Money =') print('Robot Money = ',RoundMONEY) print('>'*40) # Create by taladindy.com [https://www.talandy.com]

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue