INDICADOR INDEX FOREX: Input Parameters: extern bool Use_Start_Time=true; extern string Start_Time="2016.03.01 00:00"; //formato de la fecha a utilizar contar desde la fecha de inicio hasta la vela 0. //el indice deberia ir restando la diferencia hasta la vela cero. extern bool Show_AUD=true; extern bool Show_CAD=true; extern bool Show_CHF=true; extern bool Show_EUR=true; extern bool Show_GBP=true; extern bool Show_JPY=true; extern bool Show_NZD=true; extern bool Show_USD=true; -------------------------------------------------------------------- Colores: //---plot Label1 #property indicator_label1 "AUD" #property indicator_type1 DRAW_LINE #property indicator_color1 clrLime #property indicator_style1 STYLE_SOLID #property indicator_width1 1 //--- plot Label2 #property indicator_label2 "CAD" #property indicator_type2 DRAW_LINE #property indicator_color2 clrOrange #property indicator_style2 STYLE_SOLID #property indicator_width2 1 //--- plot Label3 #property indicator_label3 "CHF" #property indicator_type3 DRAW_LINE #property indicator_color3 clrRed #property indicator_style3 STYLE_SOLID #property indicator_width3 1 //--- plot Label4 #property indicator_label4 "EUR" #property indicator_type4 DRAW_LINE #property indicator_color4 clrDarkViolet #property indicator_style4 STYLE_SOLID #property indicator_width4 1 //--- plot Label5 #property indicator_label5 "GBP" #property indicator_type5 DRAW_LINE #property indicator_color5 clrBlack #property indicator_style5 STYLE_SOLID #property indicator_width5 1 //--- plot Label6 #property indicator_label6 "JPY" #property indicator_type6 DRAW_LINE #property indicator_color6 clrAqua #property indicator_style6 STYLE_SOLID #property indicator_width6 1 //--- plot Label7 #property indicator_label7 "NZD" #property indicator_type7 DRAW_LINE #property indicator_color7 clrSienna #property indicator_style7 STYLE_SOLID #property indicator_width7 1 //--- plot Label8 #property indicator_label8 "USD" #property indicator_type8 DRAW_LINE #property indicator_color8 clrPlum #property indicator_style8 STYLE_SOLID #property indicator_width8 1 -------------------------------------------------------------------------------------------------------------------------------- ejemplo: INDICE AUD su cálculo aplicado al close: AUD=(AudCad[i] + AudChf[i] + (AudJpy[i]/100) + AudNzd[i] + AudUsd[i] + (1/EurAud[i]) + (1/GbpAud[i])); EJEMPLO EN GRÁFICO 1H:EXTRACTO DE COTIZACIONES Y AL AUD INDEX LE APLICAMOS EL CÁLCULO DE ARRIBA. Y EL PLOT GRÁFICA LAS DIFERENCIAS DESDE START DATETIME HASTA LA VELA 0 siempre. Date Time AUDCAD,H1.Close AUDCHF,H1.Close AUDJPY,H1.Close AUDNZD,H1.Close AUDUSD,H1.Close EURAUD,H1.Close GBPAUD,H1.Close AUD Index AUD Graficado 29/07/2016 18:00:00 0,99069 0,73611 77,736 1,05291 0,75973 1,46991 1,74618 5,569792408 0 = Indice aud start datetime - Indice aud start datetime // Index vela 12 29/07/2016 19:00:00 0,9915 0,73578 77,639 1,0526 0,75861 1,47044 1,74337 5,568550253 -0,00124 =vela 11 - vela 12 // Index vela 11 29/07/2016 20:00:00 0,99184 0,73626 77,528 1,05275 0,75977 1,46929 1,7408 5,570949364 0,00116 =vela 10 - vela 12 29/07/2016 21:00:00 0,99139 0,73619 77,526 1,05215 0,76008 1,47039 1,74092 5,56957061 -0,00022 =vela 9 - vela 12 29/07/2016 22:00:00 0,992 0,73636 77,526 1,0525 0,75981 1,47096 1,74114 5,570094494 0,00030 =vela 8 - vela 12 01/08/2016 0:00:00 0,99011 0,73557 77,613 1,05425 0,75951 1,47135 1,74205 5,569254279 -0,00054 =vela 7 - vela 12 01/08/2016 1:00:00 0,99126 0,73641 77,842 1,05504 0,75963 1,47041 1,7398 5,575621136 0,00583 =vela 6 - vela 12 01/08/2016 2:00:00 0,99076 0,73541 77,635 1,05502 0,75868 1,47169 1,74155 5,569912068 0,00012 =vela 5 - vela 12 01/08/2016 3:00:00 0,99107 0,73589 77,723 1,05398 0,7594 1,47118 1,74208 5,571322929 0,00153 =vela 4 - vela 12 01/08/2016 4:00:00 0,99078 0,73611 77,869 1,05299 0,75943 1,47086 1,74341 5,571462901 0,00167 =vela 3 - vela 12 01/08/2016 5:00:00 0,99182 0,73716 78,026 1,05305 0,76071 1,46822 1,74244 5,578004692 0,00821 =vela 2 - vela 12 01/08/2016 6:00:00 0,99125 0,73673 77,951 1,05326 0,76053 1,46953 1,74248 5,575664359 0,00587 =vela 1 - vela 12 01/08/2016 7:00:00 0,99174 0,73737 77,919 1,05295 0,76116 1,46848 1,74138 5,577643446 0,00785 =vela 0 - vela 12 INDICE CAD su cálculo aplicado al close: CAD=((1/AudCad[i])+ CadChf[i] + (CadJpy[i]/100) + (1/EurCad[i]) + (1/GbpCad[i]) + (1/NzdCad[i]) + (1/UsdCad[i])); INDICE CHF su cálculo aplicado al close: CHF=((1/AudChf[i])+ (1/CadChf[i]) + (ChfJpy[i]/100) + (1/EurChf[i]) + (1/GbpChf[i]) + (1/NzdChf[i]) + (1/UsdChf[i])); INDICE EUR su cálculo aplicado al close: EUR=(EurAud[i] + EurCad[i] + EurChf[i] + EurGbp[i] + (EurJpy[i]/100) + EurNzd[i] + EurUsd[i]); INDICE GBP su cálculo aplicado al close: GBP=((1/EurGbp[i]) + GbpAud[i] + GbpCad[i] + GbpChf[i] + (GbpJpy[i]/100) + GbpNzd[i] + GbpUsd[i]); INDICE JPY su cálculo aplicado al close: JPY=((1/(AudJpy[i]/100)) + (1/(CadJpy[i]/100)) + (1/(ChfJpy[i]/100)) + (1/(EurJpy[i]/100)) + (1/(GbpJpy[i]/100)) + (1/(NzdJpy[i]/100)) + (1/(UsdJpy[i]/100))); INDICE NZD su cálculo aplicado al close: NZD=((1/AudNzd[i]) + (1/EurNzd[i]) + (1/GbpNzd[i]) + NzdCad[i] + NzdChf[i] + (NzdJpy[i]/100) + NzdUsd[i]); INDICE USD su cálculo aplicado al close: USD=((1/AudUsd[i]) + (1/EurUsd[i]) + (1/GbpUsd[i]) + (1/NzdUsd[i]) + UsdCad[i] + (UsdChf[i]) + (UsdJpy[i]/100) );