I want to change a part of the EA, i don't want to use MACD, and instead i would like to use stochastics, but i don't know how to change it and make it works. i think it is in this part:
if(OpenOrders < 1)
{
myOrderType = 3;
//----
if(iMACD(NULL, 0, 14, 26, 9, PRICE_CLOSE, MODE_MAIN, 0) >
iMACD(NULL, 0, 14, 26, 9, PRICE_CLOSE, MODE_MAIN, 1))
myOrderType = 2;
//----
if(iMACD(NULL, 0, 14, 26, 9, PRICE_CLOSE, MODE_MAIN, 0) <
iMACD(NULL,0,14,26,9,PRICE_CLOSE, MODE_MAIN, 1))
myOrderType = 1;
//----
if(ReverseCondition == 1)
if(myOrderType == 1)
myOrderType = 2;
else
if(myOrderType == 2)
myOrderType=1;
Can anybody help me with this?
if(OpenOrders < 1)
{
myOrderType = 3;
//----
if(iMACD(NULL, 0, 14, 26, 9, PRICE_CLOSE, MODE_MAIN, 0) >
iMACD(NULL, 0, 14, 26, 9, PRICE_CLOSE, MODE_MAIN, 1))
myOrderType = 2;
//----
if(iMACD(NULL, 0, 14, 26, 9, PRICE_CLOSE, MODE_MAIN, 0) <
iMACD(NULL,0,14,26,9,PRICE_CLOSE, MODE_MAIN, 1))
myOrderType = 1;
//----
if(ReverseCondition == 1)
if(myOrderType == 1)
myOrderType = 2;
else
if(myOrderType == 2)
myOrderType=1;
Can anybody help me with this?