Post your code .
This Line of code produces nothing but zeros.
Comment("GBPUSD Close: ", iClose("GBPUSD",PERIOD_D1,1));
A possibility:
double iClose( | string symbol, int timeframe, int shift) |
Open a Daily Chart for GBPUSD.
This may not be your problem, but you haven't given much to work with.
Also, you can open the History Center. Open up a pair, grayed out time periods
seem to indicate it is not or not yet collecting a history for that time period.
Double click grayed out times and they become colored.
The download button at the bottom downloads from Metaquotes, not your
dealer database. It gives a warning about that.
Heres the code
Lets try this again:
double R1, R2, R3, PP, S1, S2, S3, H, L, C, Range;
//H=High[est(NULL,PERIOD_D1,MODE_HIGH,1,1)];
//L=Low[est(NULL,PERIOD_D1,MODE_LOW,1,1)];
C=iClose("GBPUSD", PERIOD_D1,1);
H=iHigh("GBPUSD", PERIOD_D1,1);
L=iLow("GBPUSD", PERIOD_D1,1);
Range=H-C;
PP =(H+L+C)/3 ;
R1 = (2*PP) - L;
R2 = PP+Range;
R3 = PP+(Range*2);
S1 = (2*PP) - H;
S2 = PP+Range;
S3 = PP+(Range*2);
Comment("Yesterdays High: ", H, " Yesterdays Low: ", L, " Yesterdays Close: ", C, " Range: ", Range, " PP= ", PP, " R1= ", " R2= ", R2, " R3= ", R3, " S1= ", S1, " S2= ", S2, " S3= ", S3, " RSI: ", iRSI(NULL, PERIOD_D1,9,PRICE_CLOSE,1));
Using that code above works here. Gives values, looks like they might be right.
Replace "GBPUSD" with Symbol() for a test.
C=iClose(Symbol(),PERIOD_D1,1);
H=iHigh(Symbol(),PERIOD_D1,1);
L=iLow(Symbol(),PERIOD_D1,1);
Print("Format of this pairname is ", Symbol());
Check terminal for the printout.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, I need some help please i am trying to write a bot that requires pivot points, my problem is that all i get from the iHigh, iLow, and iClose values are 0's. I figured out that i could use the ihighest and ilowest to obtain these 2 values however what can i do about iclose. Thanks for your time.