I wanted to use this:
//+------------------------------------------------------------------+ //| Set number of levels and their parameters | //+------------------------------------------------------------------+ bool FiboFanLevelsSet(int levels, // number of level lines double &values[], // values of level lines color &colors[], // color of level lines ENUM_LINE_STYLE &styles[], // style of level lines int &widths[], // width of level lines const long chart_ID=0, // chart's ID const string name="FiboFan") // fan name { //--- check array sizes if(levels!=ArraySize(colors) || levels!=ArraySize(styles) || levels!=ArraySize(widths) || levels!=ArraySize(widths)) { Print(__FUNCTION__,": array length does not correspond to the number of levels, error!"); return(false); } //--- set the number of levels ObjectSetInteger(chart_ID,name,OBJPROP_LEVELS,levels); //--- set the properties of levels in the loop for(int i=0;i<levels;i++) { //--- level value ObjectSetDouble(chart_ID,name,OBJPROP_LEVELVALUE,i,values[i]); //--- level color ObjectSetInteger(chart_ID,name,OBJPROP_LEVELCOLOR,i,colors[i]); //--- level style ObjectSetInteger(chart_ID,name,OBJPROP_LEVELSTYLE,i,styles[i]); //--- level width ObjectSetInteger(chart_ID,name,OBJPROP_LEVELWIDTH,i,widths[i]); //--- level description ObjectSetString(chart_ID,name,OBJPROP_LEVELTEXT,i,DoubleToString(100*values[i],1)); } //--- successful execution return(true); }
function from the codebase to set up the custom levels instead of last 90-100 lines of neanderthal's intelect level code, but couldn't figure out how to properly write it down.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
This script prompts for 1x1 angle value then puts two Fibonacci fans (bull and bear) with custom levels 50 pixels from the top, bottom and left borders of chart. The fans are ready selected for manual dragging over the chart.
If you have no idea what Gann angles are about but want to try the script put some of these values - EURUSD 0.0014, EURJPY 0.14, GBPUSD 0.0020, most other crosses 0.0010, Gold 2.5, Oil 0.25 - and drag the fans to tops and bottoms where they match best and use the angles as trendlines or just measure the slope of the trendlines you draw by yourself.