| / | Forum |
|
faqcya
2007.10.11 10:23
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. |
|
Strategy Tester: Modes of Modeling during Testing Many programs of technical analysis allow to test trading strategies on history data. In the most cases, the testing is conducted on already completed data without any attempts to model the trends within a price bar. It was made quickly, but not precisely |
|
phy
2007.10.11 16:17
Post your code . |
|
faqcya
2007.10.11 23:09
This Line of code produces nothing but zeros. Comment("GBPUSD Close: ", iClose("GBPUSD",PERIOD_D1,1)); |
|
phy
2007.10.12 00:07
faqcya wrote:
This Line of code produces nothing but zeros. Comment("GBPUSD Close: ", iClose("GBPUSD",PERIOD_D1,1));
|
|
faqcya
2007.10.12 01:15
How do you load local history?
|
|
phy
2007.10.12 01:21
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 Double click grayed out times and they become colored. The download button at the bottom downloads from Metaquotes, not your |
|
faqcya
2007.10.12 01:50
Heres the code |
|
faqcya
2007.10.12 01:54
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)); |
|
faqcya
2007.10.12 01:57
tried puting it on a daily chart, tried downloading the chart, made sure it wasn't
greyed out in history center, still 0's
|
|
faqcya
2007.10.12 02:01
It compiles fine and i get an accurate reading for the RSI, but nothing else
|
|
phy
2007.10.12 02:51
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. |