AUTOITでの記述依頼
MT5のインジケータからCOMMONファイルに出力
出力されたファイル名:USDJPY_Color_Sniper_Sign.txt
内容:BUY
の状態で下記の記述をコンパイルしたものを
IEモードで作動させたMicrosoft Edge にバイナリーオプションで
USDJPYの画面を表示して使用した時
3156行にFile:「C:\Users¥◯◯¥Disktop¥Autoit\USDJPY.exe」
エラー 変数のタイプは「オブジェクトである必要があります」
となりBOTの実行ができませんでした
そもそも3156行もの記述もなく対策のわかる方に
記述の見直しを依頼
値段交渉には応じる事も可能です
ーーーーーーーーーーーーーーーーーーーーーーーーー
#include
HotKeySet ("s", "stopprogram")
While 1
$sFilePath = "C:\\Users\\"&@UserName&"\\AppData\\Roaming\\MetaQuotes\\Terminal\\Common\\Files\\
USDJPY_Color_Sniper_Sign.txt"
$hFileOpen = FileOpen($sFilePath)
$sFileRead = FileRead($hFileOpen)
FileClose($hFileOpen)
;MsgBox(0,"debug",$sFilePath&$sFileRead)
$oIE = _IEAttach("https://trade.highlow.com/", "URL")
;_IEAction($oIE, "refresh")
_IELoadWait($oIE)
$oIEactive = WinActivate("取引| HighLowバイナリーオプション - Internet Explorer")
if $sFileRead == "BUY" Then
;press high
$oDivs = _IETagNameGetCollection($oIE, "div")
For $oDiv In $oDivs
If StringInStr($oDiv.classname, "up button") > 0 and $oDiv.innertext = "High" Then
_IEAction($oDiv, "click")
ExitLoop
EndIf
Next
ElseIf $sFileRead == "SELL" Then
;press low
$oDivs = _IETagNameGetCollection($oIE, "div")
For $oDiv In $oDivs
If StringInStr($oDiv.classname, "dwn button") > 0 and $oDiv.innertext = "Low" Then
_IEAction($oDiv, "click")
ExitLoop
EndIf
Next
EndIf
Sleep(1000)
if $sFileRead == "BUY" or $sFileRead == "SELL" Then
;press entry
;MsgBox(0,"debug","entory ok?")
_IELinkClickByText ($oIE, "今すぐ購入")
$FileHandle = FileOpen($sFilePath,2)
FileWrite($FileHandle,"entried")
FileClose($FileHandle)
EndIf
If Mod(@MIN,Random(11,19)) == 0 Then
_IELoadWait($oIE)
EndIf
Sleep (1000)
WEnd
Func stopprogram()
Exit
EndFunc
出力されたファイル名:USDJPY_Color_Sniper_Sign.txt
内容:BUY
の状態で下記の記述をコンパイルしたものを
IEモードで作動させたMicrosoft Edge にバイナリーオプションで
USDJPYの画面を表示して使用した時
3156行にFile:「C:\Users¥◯◯¥Disktop¥Autoit\USDJPY.exe」
エラー 変数のタイプは「オブジェクトである必要があります」
となりBOTの実行ができませんでした
そもそも3156行もの記述もなく対策のわかる方に
記述の見直しを依頼
値段交渉には応じる事も可能です
ーーーーーーーーーーーーーーーーーーーーーーーーー
#include
HotKeySet ("s", "stopprogram")
While 1
$sFilePath = "C:\\Users\\"&@UserName&"\\AppData\\Roaming\\MetaQuotes\\Terminal\\Common\\Files\\
USDJPY_Color_Sniper_Sign.txt"
$hFileOpen = FileOpen($sFilePath)
$sFileRead = FileRead($hFileOpen)
FileClose($hFileOpen)
;MsgBox(0,"debug",$sFilePath&$sFileRead)
$oIE = _IEAttach("https://trade.highlow.com/", "URL")
;_IEAction($oIE, "refresh")
_IELoadWait($oIE)
$oIEactive = WinActivate("取引| HighLowバイナリーオプション - Internet Explorer")
if $sFileRead == "BUY" Then
;press high
$oDivs = _IETagNameGetCollection($oIE, "div")
For $oDiv In $oDivs
If StringInStr($oDiv.classname, "up button") > 0 and $oDiv.innertext = "High" Then
_IEAction($oDiv, "click")
ExitLoop
EndIf
Next
ElseIf $sFileRead == "SELL" Then
;press low
$oDivs = _IETagNameGetCollection($oIE, "div")
For $oDiv In $oDivs
If StringInStr($oDiv.classname, "dwn button") > 0 and $oDiv.innertext = "Low" Then
_IEAction($oDiv, "click")
ExitLoop
EndIf
Next
EndIf
Sleep(1000)
if $sFileRead == "BUY" or $sFileRead == "SELL" Then
;press entry
;MsgBox(0,"debug","entory ok?")
_IELinkClickByText ($oIE, "今すぐ購入")
$FileHandle = FileOpen($sFilePath,2)
FileWrite($FileHandle,"entried")
FileClose($FileHandle)
EndIf
If Mod(@MIN,Random(11,19)) == 0 Then
_IELoadWait($oIE)
EndIf
Sleep (1000)
WEnd
Func stopprogram()
Exit
EndFunc
コメント
※コメントを投稿するにはログインが必要です。