Trailing_Limit_monitor
Posted: Mon Jul 16, 2018 7:26 am
Your last stop on a way to find a fast growing community of forex traders and software developers. Best forex charts indicators are available here for download. Custom development of indicators and translation to .LUA is also available on request.
http://fxcodebase.com/code/
function CreateController(trade)
local offer = core.host:findTable("offers"):find("Instrument", trade.Instrument);
local controller = {};
controller.TradeID = trade.TradeID;
controller.TrailingSize = instance.parameters.TrailingStep;
controller.InitialLimit = math.abs(trade.Open - trade.Limit) / offer.PointSize;
local file = io.open("trade.Open.txt", "w")
file:write(trade.Open)
file:close()
local file = io.open("trade.Limit.txt", "w")
file:write(trade.Limit)
file:close()
return controller;
end