Initial commit: MQL5 Scripts Collection (MetaTrader 5)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# 🚀 Unlock the Power of Trading!
|
||||
|
||||
Welcome to this open-source trading project. Here you will find powerful tools to enhance your trading journey. If you find this project useful, please consider starring ⭐, sharing, or donating to support further development!
|
||||
|
||||
---
|
||||
|
||||
**Support the project:**
|
||||
- Star this repository on GitHub
|
||||
- Share it with your trading friends
|
||||
- [Donate here](https://www.paypal.com/donate/?hosted_button_id=YOUR_BUTTON_ID) to help us grow!
|
||||
|
||||
---
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## Source Files
|
||||
- `wideshooter.mq5`
|
||||
|
||||
---
|
||||
> Made with ❤️ for the trading community.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
@@ -0,0 +1,67 @@
|
||||
//+------------------------------------------------------------------+
|
||||
//| WideShootrer |
|
||||
//| Copyright 2012,Karlson |
|
||||
//+------------------------------------------------------------------+
|
||||
#property copyright "2012, Karlson."
|
||||
#property link "https://login.mql5.com/ru/users/Karlson"
|
||||
#property description "WideShootrer"
|
||||
#property version "1.00"
|
||||
//-------------------------------------------------------------------+
|
||||
double High[],Low[];
|
||||
int bars=1500,KF=1; // ñêðèí áóäåò îòîáðàæàòü 1500 áàðîâ îò ëåâîãî êðàÿ ãðàôèêà íàïðàâî
|
||||
//-------------------------------------------------------------------+
|
||||
void OnStart()
|
||||
{
|
||||
if(_Digits==5 || _Digits==3) {KF=10;} else {KF=1;}
|
||||
|
||||
// îïðåäåëÿåì ïåðâûé ëåâûé áàð.Îò íåãî áóäåì äåëàòü ñêðèíøîò
|
||||
|
||||
int first_bar=(int)ChartGetInteger(0,CHART_FIRST_VISIBLE_BAR);
|
||||
|
||||
// îïðåäåëÿåì ñêîëüêî ïîêàçûâàåò íà ãðàôèêå áàðîâ - ïîòðåáóåòñÿ äëÿ îïðåäåëåíèÿ øèðèíû ñêðèíøîòà
|
||||
|
||||
int vis_bar=(int)ChartGetInteger(0,CHART_VISIBLE_BARS);Print("Ïî øèðèíå ãðàôèêà îòîáðàæåíî áàðîâ=",vis_bar);
|
||||
|
||||
// ïîëó÷àåì öåíû â ìàññèâ íà ïðîìåæóòêå ñ íàøåãî áàðà è 1500 áàðîâ äëÿ óñòàíîâêè õàé-ëîó ãðàôèêà
|
||||
|
||||
if(first_bar<bars) {bars=first_bar;} // åñëè ãðàôèê ñìåùåí ìåíåå ÷åì òðåáóåòñÿ áàðîâ,òîãäà áåðåì âñå ÷òî åñòü âïðàâî äî òåêóùåãî âðåìåíè
|
||||
|
||||
int ch=CopyHigh(_Symbol,_Period,first_bar-bars,bars,High);
|
||||
int cl=CopyLow(_Symbol,_Period,first_bar-bars,bars,Low);
|
||||
|
||||
// îïðåäåëÿåì õàé ëîó íà íàøåì ïðîìåæóòêå è óñòàíàâëèâàåì âåðõ íèç øêàëû öåíû
|
||||
|
||||
double min_price=Low[ArrayMinimum(Low,0,bars)];
|
||||
|
||||
double max_price=High[ArrayMaximum(High,0,bars)];
|
||||
|
||||
// çàôèêñèðóåì øêàëó è óñòàíîâèì âåðõ íèç
|
||||
|
||||
ChartSetInteger(0,CHART_SCALEFIX,0,1);
|
||||
ChartSetDouble(0,CHART_FIXED_MAX,max_price+20*KF*_Point);
|
||||
ChartSetDouble(0,CHART_FIXED_MIN,min_price-20*KF*_Point);
|
||||
ChartSetInteger(0,CHART_AUTOSCROLL,false);
|
||||
|
||||
// ïîëó÷èì òåêóùóþ äàòó â ïðîñòîì ôîðìàòå äëÿ ôîìèðîâàíèÿ èìåíè ôàéëà
|
||||
|
||||
MqlDateTime day;
|
||||
|
||||
TimeToStruct(TimeCurrent(),day);
|
||||
|
||||
string file=_Symbol+(string)day.year+"_"+(string)day.mon+"_"+(string)day.day+"_"+(string)day.hour+"_"+(string)day.min+"_"+(string)day.sec+".png";
|
||||
|
||||
// îïðåäåëèì âûñîòó è øèðèíó áóäóùåãî ñêðèíà
|
||||
|
||||
int screen_width=1000*bars/vis_bar;Print("Øèðèíà ñêðèíà=",screen_width);
|
||||
|
||||
int scr_height=(int)ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS);
|
||||
|
||||
// ñäåëàåì ñêðèíøîò
|
||||
|
||||
ChartScreenShot(0,file,screen_width,scr_height,ALIGN_LEFT);
|
||||
|
||||
if(GetLastError()>0) {Print("Error (",GetLastError(),") ");} ResetLastError();
|
||||
|
||||
}
|
||||
|
||||
//+------------------------------------------------------------------+
|
||||
Reference in New Issue
Block a user