Probably like this:xlitang wrote:Thanks, Steve,xlitang wrote:Could someone please help me to modify the codes inside getSixths() below so that I call this function in EA to get values for TopLine and BottomLine for caurrency pairs that EA is not attached to. Say I attached EA to EURUSD chart, but I want to get values for AUDJPY pair, I will pass AUDJPY to GetSixths(symbol) to get TopLine and BottomLine for AUDJPY.
TopLine = High[iHighest(NULL,0,MODE_HIGH,BarCount,1)];
if (High[0] > TopLine) TopLine = NormalizeDouble(High[0], Digits);
BottomLine = Low[iLowest(NULL,0,MODE_LOW,BarCount,1)];
if (Low[0] < BottomLine) BottomLine = NormalizeDouble(Low[0], Digits);
Is this possible?
Code: Select all
TopLine = High[iHighest("AUDJPY",0,MODE_HIGH,BarCount,1)];
if (iHigh("AUDJPY", 0, 0) > TopLine) TopLine = iHigh("AUDJPY", 0, 0);
BottomLine = Low[iLowest("AUDJPY",0,MODE_LOW,BarCount,1)];
if (iLow("AUDJPY", 0, 0) < BottomLine) BottomLine = iLow("AUDJPY", 0, 0);

