Блог им. egrig

ChatGPT раскрыл Грааль - осталось вбить номер счёта


ChatGPT раскрыл Грааль - осталось вбить номер счёта

Полный ответ от чат-бота:

function OnInit()
instrument = «TQBR» — Set instrument code here
class = «SHARES» — Set instrument class here
account = «YOUR_ACCOUNT» — Set your trading account here

maFast = 10 — Set the period for fast moving average
maSlow = 20 — Set the period for slow moving average

EnterVolumeThreshold = 1000 — Set the volume threshold for entering a position

openPositions = false — Track if there are currently open positions
end

function OnQuote(class, instrument)
local lastCandle = getQuoteItem(class, instrument, «LAST») — Get the last traded price
local volume = getQuoteItem(class, instrument, «VOL») — Get the trading volume

— Calculate moving averages
local maFastValue = MA(instrument, class, 0, maFast, «LAST»)
local maSlowValue = MA(instrument, class, 0, maSlow, «LAST»)

— Enter into position on growing volumes
if not openPositions and volume > EnterVolumeThreshold then
message(«Entering position at »..lastCandle)
transmitTransaction(account, instrument, class, 0, 1, lastCandle, «S»)
openPositions = true
end

— Exit when moving averages cross each other
if openPositions and maFastValue < maSlowValue then
message(«Exiting position at »..lastCandle)
transmitTransaction(account, instrument, class, 0, 1, lastCandle, «B»)
openPositions = false
end
end
★1
2 комментария
ну и что? Чтобы запускать бота, надо понимать значение каждой переменной и каждой строки. А не просто вбил номер счета и потекли бабки. Потом они у тебя утекут все за секунду, знать не будешь куда и зачем. Или бота маркетмейкер поймает (что делается за полчаса).
avatar
Не поймает он маркетера. GPT слишком сырая штука
avatar

теги блога Evgen Grig

....все тэги



UPDONW
Новый дизайн