Stock Portfolio Organizer
The ultimate porfolio management solution.
Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
tarikh for Amibroker (AFL)
Copy & Paste Friendly
Back
_SECTION_BEGIN("G2J 1.4"); // http://www.bourex.com/viewtopic.php?t=16107&start=45 // Kourosh Kabir 1389/11/15 (5 Parameters) SetBarsRequired(1000000,1000000); ind=StrToNum(NumToStr(BarIndex())); sajal=1210; sagr=Year(); magr=Month(); rogr=Day(); roha=DayOfWeek(); tdromab=DayOfYear()+25123; sagrmo=sagr; while(sagrmo[ind]>1900) { sagrmo--; tdromab[ind]+=365; if((sagrmo[ind]%4==0 AND sagrmo[ind]%100!=0) OR sagrmo[ind]%400==0) tdromab[ind]++; } do { sakab=(((sajal-1210+1)%33)-1)%4; sajal++; tdromab[ind]-=365; if(sakab==0) tdromab[ind]--; }while(tdromab[ind]>365); switch(tdromab[ind]) { case 0: rojal=30; majal=12; sajal--;break; default: if(tdromab[ind]<=186) { rojal=tdromab[ind]%31; majal=(tdromab[ind]-rojal)/31; if(rojal==0) rojal=31; else majal++; } else { tdromab[ind]-=186; rojal=tdromab[ind]%30; majal=(tdromab[ind]-rojal)/30; if(rojal==0) { majal+=6; rojal=30; } else majal+=7; }break; } switch(roha[ind]) { case 0: rohare="1O?E?";break; case 1: rohare="2O?E?";break; case 2: rohare="3O?E?";break; case 3: rohare="4O?E?";break; case 4: rohare="5O?E?";break; case 5: rohare="????";break; case 6: rohare="O?E?";break; } if(magr[ind]<10) magrre="0"+NumToStr(magr,1,0); else magrre=NumToStr(magr,2,0); if(rogr[ind]<10) rogrre="0"+NumToStr(rogr,1,0); else rogrre=NumToStr(rogr,2,0); if(majal<10) majalre="0"+NumToStr(majal,1,0); else majalre=NumToStr(majal,2,0); if(rojal<10) rojalre="0"+NumToStr(rojal,1,0); else rojalre=NumToStr(rojal,2,0); jaldate=NumToStr(sajal,4,0)+"/"+majalre+"/"+rojalre; grdate=NumToStr(sagr,4,0)+"/"+magrre+"/"+rogrre; GfxSetBkMode(1); if(ParamToggle("Tooltip","Default|Date",1)) ToolTip=" "+rohare+" "+jaldate+" "+StrFormat("\n Kourosh kabir\n\nOpen: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr(V,1.0),O,H,L,C,SelectedValue(ROC(C,1))); if(ParamToggle("G overlay","On|Off")) GfxSetOverlayMode(1); GfxSelectFont("Tahoma",Param("G font size",13,7,45,1)); GfxSetTextColor(ParamColor("G color",colorGreen)); mode=ParamList("Title","Default - Graphic|Date - Values|Date|Default"); if(mode=="Default - Graphic") GfxTextOut(rohare+" "+jaldate,3,15); if(mode=="Date - Values") _N(Title=Name()+" "+jaldate+" "+rohare+StrFormat(" {{INTERVAL}}"+" "+grdate+" Open %g High %g Low %g Close %g (%.1f%%) Volume "+NumToStr(V,1.0),O,H,L,C,SelectedValue(ROC(C,1)))+"\n{{VALUES}}"); if(mode=="Date") _N(Title=Name()+" "+jaldate+" "+rohare+StrFormat(" {{INTERVAL}}"+" "+grdate+" Open %g High %g Low %g Close %g (%.1f%%) Volume "+NumToStr(V,1.0),O,H,L,C,SelectedValue(ROC(C,1)))); if(mode=="Default") _N(Title=StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol "+NumToStr(V,1.0)+" {{VALUES}}",O,H,L,C,SelectedValue(ROC(C,1)))); _SECTION_END();