|
|
-
Language translation for TRIX indicator?
Got it from .lua file, i know C# so i don't fully understand what it says, i try to build the indicator by my own from O2G ticks update-
indicator.parameters:addStringAlternative("MA_2", "MVA", "", "MVA");
indicator.parameters:addStringAlternative("MA_2", "EMA", "", "EMA");
indicator.parameters:addStringAlternative("MA_2", "LWMA", "", "LWMA");
indicator.parameters:addStringAlternative("MA_2", "TMA", "", "TMA");
indicator.parameters:addStringAlternative("MA_2", "SMMA*", "", "SMMA");
indicator.parameters:addStringAlternative("MA_2", "Vidya (1995)*", "", "VIDYA");
indicator.parameters:addStringAlternative("MA_2", "Vidya (1992)*", "", "VIDYA92");
indicator.parameters:addStringAlternative("MA_2", "Wilders*", "", "WMA");
indicator.parameters:addString("MA_3", "Third Smoothing Method", "The methods marked by an asterisk (*) require the appropriate indicators to be loaded.", "EMA");
indicator.parameters:addStringAlternative("MA_3", "MVA", "", "MVA");
indicator.parameters:addStringAlternative("MA_3", "EMA", "", "EMA");
indicator.parameters:addStringAlternative("MA_3", "LWMA", "", "LWMA");
indicator.parameters:addStringAlternative("MA_3", "TMA", "", "TMA");
indicator.parameters:addStringAlternative("MA_3", "SMMA*", "", "SMMA");
indicator.parameters:addStringAlternative("MA_3", "Vidya (1995)*", "", "VIDYA");
indicator.parameters:addStringAlternative("MA_3", "Vidya (1992)*", "", "VIDYA92");
indicator.parameters:addStringAlternative("MA_3", "Wilders*", "", "WMA");
indicator.parameters:addInteger("S_N", "Signal Periods", "", 9);
indicator.parameters:addString("MA_S", "Signal Smoothing Method", "The methods marked by an asterisk (*) require the appropriate indicators to be loaded.", "MVA");
indicator.parameters:addStringAlternative("MA_S", "MVA", "", "MVA");
indicator.parameters:addStringAlternative("MA_S", "EMA", "", "EMA");
indicator.parameters:addStringAlternative("MA_S", "LWMA", "", "LWMA");
indicator.parameters:addStringAlternative("MA_S", "TMA", "", "TMA");
indicator.parameters:addStringAlternative("MA_S", "SMMA*", "", "SMMA");
indicator.parameters:addStringAlternative("MA_S", "Vidya (1995)*", "", "VIDYA");
indicator.parameters:addStringAlternative("MA_S", "Vidya (1992)*", "", "VIDYA92");
indicator.parameters:addStringAlternative("MA_S", "Wilders*", "", "WMA");
indicator.parameters:addColor("TRIX_color", "Color of trix line", "", core.rgb(255, 0, 0));
indicator.parameters:addColor("SIGNAL_color", "Color of signal line", "", core.rgb(0, 255, 0));
end
local source;
local MA1, MA2, MA3, MA4;
local TRIX, SIGNAL;
function Prepare()
local name;
name = profile:id() .. "(" .. instance.source:name() .. "," .. instance.parameters.P_N .. "," .. instance.parameters.S_N .. ")";
instance:name(name);
MA1 = core.indicators:create(instance.parameters.MA_1, instance.source, instance.parameters.P_N);
MA2 = core.indicators:create(instance.parameters.MA_2, MA1.DATA, instance.parameters.P_N);
MA3 = core.indicators:create(instance.parameters.MA_3, MA2.DATA, instance.parameters.P_N);
TRIX = instance:addStream("T", core.Line, name .. ".T", "T", instance.parameters.TRIX_color, MA3.DATA:first() + 1);
TRIX:addLevel(0);
MA4 = core.indicators:create(instance.parameters.MA_S, TRIX, instance.parameters.S_N);
SIGNAL = instance:addStream("S", core.Line, name .. ".S", "S", instance.parameters.SIGNAL_color, MA4.DATA:first());
end
function Update(period, mode)
MA1:update(mode);
MA2:update(mode);
MA3:update(mode);
if period >= TRIX:first() then
TRIX[period] = (MA3.DATA[period] - MA3.DATA[period - 1]) / MA3.DATA[period - 1] * 100;
end
MA4:update(mode);
if period >= SIGNAL:first() then
SIGNAL[period] = MA4.DATA[period];
end
end
//------------------------
Thanks.
-
Hi Block,
It seems that my message has been deleted due to issues with the forum. So I'll post it again.
You can use the indicorecom library. The library is intended to provide an access to standard and custom indicators of the Marketscope application. You can find the user guide in the Help folder with the folder where Order2Go API is installed. By default:
C:\Program Files\Candleworks\FXOrder2Go\Help\indicorecom.chm
-
Hay Natalya...
I saw the examples and i try to run it today, it was not work give 'indicators not loaded yet' exception maybe because it's Sunday despite i try to get list of the indicators, i will anyway try again later... i try to work with the examples from the extract (Sample 1-4) and one published in the site (MainApp and additional 3 .cs files), non of them work for me...
Could you please direct me to C# simple code that only give me the list of available indicators and getting the rates of one of them in current time?
Thank You.
-
hi
can u send me the link of trix.lau file (strategy)
by
-
Please visit the FxCodeBase site. It is a great resource that offers hundreds of different indicators for the MarketScope charting package with Trix being one that's already been created and is ready to use. You can find it here:
FXCodeBase.COM: Forex Chart Indicators and Development; View topic - Trix
|