no one ?
MakeFibo(Time[0],High[0],Time[0],High[0]-100*Point);
You are using the price of the current candl for calculations, i assume you want to use the price range of the swing insteas...
//z
Hi there,
I'm just a little curious, is this software an EA or indicator???? It has features from both kinds. :)
There is no way this thing works without identifying what kind of code it has to be.
In mql4, you have to choose whether you want to write a code as EA or indicator. sometime people go with scripts or Library, and that all make sense.
The more you give info, the more help you can get :)
I hope this info is useful
Good luck,
SF
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
Hi all.
I'm programming a tool that uses the object "Fib Expansion", to Limit Orders, Sl and TP.But I could not do the calculations and not even get the values of prices that are in these respective levels of fibexpansion. Can someone help me?
I referred to as an attached picture of what I want to do .
Thanks:)
//+------------------------------------------------------------------+ //| forexavancado_com_i-fiboexp.mq4 | //| forexavancado.com | //| http://www.forexavancado.com | //+------------------------------------------------------------------+ #property copyright "forexavancado.com" #property link "http://www.forexavancado.com" extern string object_name="fibozoio"; extern double lot=0.01; extern double level0=2.098,level1=1.618,level2=1.270,level3=1,level4=0.618,level5=0.380,level6=0.098,level7=-1.270,level8=-1.618; extern int time_frame=60; double level0p,level1p,level2p,level3p,level4p,level5p,level6p,level7p,level8p; //+------------------------------------------------------------------+ int init() { return(0); } //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ int start() { if(ObjectFind(object_name) != -1){ MakeFibo(Time[0],High[0],Time[0],High[0]-100*Point); Comment ("Obj: "+(ObjectGetFiboDescription(object_name, 0)),"/n level1p: "+level1p ); //Buy compare if(iCustom(Symbol(),time_frame,"forexavancado_com",0,0) > iCustom(Symbol(),time_frame,"forexavancado_com",1,0)){ ObjectSet(object_name, OBJPROP_COLOR,Green); ObjectSet(object_name, OBJPROP_LEVELCOLOR,Green);ObjectSet(object_name, OBJPROP_FIBOLEVELS,9); ObjectSet(object_name, OBJPROP_FIRSTLEVEL+0,level0);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+1,level1);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+2,level2); ObjectSet(object_name, OBJPROP_FIRSTLEVEL+3,level3);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+4,level4);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+5,level5); ObjectSet(object_name, OBJPROP_FIRSTLEVEL+6,level6);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+7,level7);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+8,level8); } //Sell compare else { ObjectSet(object_name, OBJPROP_COLOR,Red); ObjectSet(object_name, OBJPROP_LEVELCOLOR,Red);ObjectSet(object_name, OBJPROP_FIBOLEVELS,9); ObjectSet(object_name, OBJPROP_FIRSTLEVEL+0,level0);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+1,level1);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+2,level2); ObjectSet(object_name, OBJPROP_FIRSTLEVEL+3,level3);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+4,level4);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+5,level5); ObjectSet(object_name, OBJPROP_FIRSTLEVEL+6,level6);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+7,level7);ObjectSet(object_name, OBJPROP_FIRSTLEVEL+8,level8); } } return(0); } //+------------------------------------------------------------------+ void MakeFibo(datetime StartTime, double HiPrice, datetime EndTime,double LoPrice) { double Dif = HiPrice-LoPrice; level0p = LoPrice + (Dif*level0); level1p = LoPrice + (Dif*level1); level2p = LoPrice + (Dif*level2); level3p = LoPrice + (Dif*level3); level4p = LoPrice + (Dif*level4); level5p = LoPrice + (Dif*level5); level6p = LoPrice + (Dif*level6); level7p = LoPrice + (Dif*level7); level8p = LoPrice + (Dif*level8); return(0); }