cBot Robot_Forex & Start Order with EMA
Created at 02 Feb 2014, 16:57
cBot Robot_Forex & Start Order with EMA
02 Feb 2014, 16:57
Hi all,
with reference to this CBOT:
/algos/cbots/show/225
at line 257 there is this code:
private int GetStdIlanSignal () { int Result = -1; LastBarIndex MarketSeries.Close.Count int = - 2; PrevBarIndex LastBarIndex int = - 1; if (MarketSeries.Close [LastBarIndex]> MarketSeries.Open [LastBarIndex]) if (MarketSeries.Close [PrevBarIndex]> MarketSeries.Open [PrevBarIndex]) Result = 0; if (MarketSeries.Close [LastBarIndex] <MarketSeries.Open [LastBarIndex]) if (MarketSeries.Close [PrevBarIndex] <MarketSeries.Open [PrevBarIndex]) Result = 1; return Result; }
which returns the signal to the line 89 to start the first order.
I would like to modify the code so that the signal is generated by comparing the to EMA20 the price.
I tried but I failed.
How can you make?
Thanks