Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools

Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools (http://www.expert-advisor.com/forum/index.php)
-   Codeschnipsel (http://www.expert-advisor.com/forum/forumdisplay.php?f=292)
-   -   ShowSpread - der wohl kleinste Indikator der was sinnvolles macht (http://www.expert-advisor.com/forum/showthread.php?t=5348)

Kronenchakra 19.12.16 00:44

ShowSpread - der wohl kleinste Indikator der was sinnvolles macht
 
Besonders für Scalper ist es wichtig den aktuellen Spread zu wissen.
EURUSD oder USDJPY zu scalpen mit Spread > 12 macht nicht viel Sinn.
Daher dieses MiniTool.
Code:

#property indicator_chart_window
#property indicator_plots 0

int  OnInit() {return(INIT_SUCCEEDED);}
void OnDeinit(const int reason) {Comment("");}

int OnCalculate (const int rates_total,const int prev_calculated,const int begin,const double& price[])
{
  long Spread;
  SymbolInfoInteger(_Symbol,SYMBOL_SPREAD,Spread);
  Comment("Spread: ",Spread);
  return(rates_total);
}

Kann man natürlich auch in einem Minidialog darstellen wo die Zahlen ihre Farben verändern. zB wie eine Ampel: Rot, Gelb Grün

Ich wünsche euch viele Pips damit


Alle Zeitangaben in WEZ +2. Es ist jetzt 04:51 Uhr.

Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.1
Powered by vBCMS® 2.7.0 ©2002 - 2024 vbdesigns.de
Copyright ©2009 - 2023 by Expert-Advisor.com - Das Metatrader Forum