anthor:
below is the journal log
2012.11.06 22:03:06 2012.11.01 13:15 Bar GBPUSD,H1: 1.61115000<1.61169000
but, still didn't print the "Buy!!" why ???
I don't know the calculation inside CheckLowest() function, but try to assign it to some variable and see
double abc, xyz; abc = Bid; xyz = CheckLowest(); Print(abc+"<"+xyz); if (abc < xyz) { Print("Buy!!"); }
anthor:
Because the code you have there did not output what you have shown to the log . . . Print() outputs 4 decimal digits, what you have there in the log is 8 . . . that code did not produce that log output . . . . find the code that did.below is the journal log
2012.11.06 22:03:06 2012.11.01 13:15 Bar GBPUSD,H1: 1.61115000<1.61169000
but, still didn't print the "Buy!!" why ???
RaptorUK:
Because the code you have there did not output what you have shown to the log . . . Print() outputs 4 decimal digits, what you have there in the log is 8 . . . that code did not produce that log output . . . . find the code that did.
Sorry Raptor, you're wrong this time. If the code wasBecause the code you have there did not output what you have shown to the log . . . Print() outputs 4 decimal digits, what you have there in the log is 8 . . . that code did not produce that log output . . . . find the code that did.
Print(Bid+"<"+CheckLowest());
Print(Bid,"<",CheckLowest());you'd be correct but double+string expands to 8 digits.
WHRoeder:
Sorry Raptor, you're wrong this time. If the code was
. . . you'd be correct but double+string expands to 8 digits.
WHRoeder:
Sorry Raptor, you're wrong this time. If the code wasyou'd be correct but double+string expands to 8 digits.
Sorry Raptor, you're wrong this time. If the code wasyou'd be correct but double+string expands to 8 digits.
What is the return type of CheckLowest() function ?, Is it string or double ?
If its double, it should print correctly
double abc, xyz; abc = Bid; xyz = CheckLowest(); Print(DoubleToStr(abc, 8) + "<" + DoubleToStr(xyz, 8)); if (abc < xyz) { Print("Buy!!"); }
But if its a string, well, you can not compare double with string, can you ?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
below is the journal log
2012.11.06 22:03:06 2012.11.01 13:15 Bar GBPUSD,H1: 1.61115000<1.61169000
but, still didn't print the "Buy!!" why ???