Hi everybody ,
I have some difficulty for implementing a live trading. I have a solution to the problem but It requires to use R. So It's not a efficient solution. First of all, suppose you have the the strategy below :
function run()
{
StartDate = 20110101;
EndDate = 20171231;
BarPeriod = 60*24; //
LookBack = 600;

set(PRELOAD|LOGFILE|PLOTNOW);
assetHistory("^GSPC",FROM_AV);
asset("^GSPC");
PlotHeight1 = 800; // height of the chart with results
PlotWidth = 2000;

/////////////////////////////////
vars Price = series(priceClose());
vars high=series(priceHigh());
vars low=series(priceLow());
vars zerolag=series(KAMA(Price,10));
vars fastema = series(EMA(Price,50));
vars slowema = series(EMA(Price,80));

asset("SPX500");
if(fastema[0]>slowema[0])
{
enterLong();

}

if(fastema[0]<slowema[0])
{
exitLong();

}


}


I use it for backtest, and it's working but It's not the case in live trading (no asset data for ^GSPC).
I've said that , there is a solution to solve it : the use of R. I call R via the script and I do all calculation in R, and I retrieve the signal for trading. In real case, if I have a lot of calculation, and multiple account to manage. It's became hard to do this.

So can you give me some advise or suggestion to solve my problems without using R .
THANKS FOR YOUR HELP !! :-)