Forex Zone - Forex Forum

Loukie

Discussion started on MT4 / MT5 EAs

  • Newbie
  • Posts: 30
  • Points: 0
  • Likes Received: 4
  • Reputation: +1/-0
Advanced Meter and FPS meter are not the same.
FPS also has the advanced meter.

It calculates the currency strengths, no matter what TF you have them on.

Ah, ok,

so I will try that one.

Thanks a lot.

Would you mind check out the mtf rsi same direction topic again and write what you think. Maybe the pro coders will see that it is more than one person and maybe they code it, as they got the "sceleton" of it already. (osma same direction)
#16 - November 02, 2018, 07:41:15 AM

  • Newbie
  • Posts: 30
  • Points: 0
  • Likes Received: 4
  • Reputation: +1/-0
...FPS doesn`t show up on the chart (at all)

Tried to change a bit in the code forth and back (works when a older version doesn`t work with new build)

....nothing
#17 - November 02, 2018, 07:45:26 AM

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
Check your Expert tab, it will give an error there.

Regarding your MTF_RSI, I downloaded it. 
What do you want done? I can't change the code, as it is in EX4 format, (and frankly I am not that good) but I can try and write an EA that will send Alerts/Notifications based on it's outputs
#18 - November 02, 2018, 07:57:42 AM

  • Newbie
  • Posts: 30
  • Points: 0
  • Likes Received: 4
  • Reputation: +1/-0
Check your Expert tab, it will give an error there.

Regarding your MTF_RSI, I downloaded it.
What do you want done? I can't change the code, as it is in EX4 format, (and frankly I am not that good) but I can try and write an EA that will send Alerts/Notifications based on it's outputs
...but in my topic (coding new indicator)

"MTF RSI same direction, level 50"

is no indicator attached, only a picture to illustrate what I mean ?!

Where did you download the mtf rsi indi, was it the wrong topic??
#19 - November 02, 2018, 08:03:54 AM

  • Newbie
  • Posts: 30
  • Points: 0
  • Likes Received: 4
  • Reputation: +1/-0

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
I downloaded it from the website on your image.

I attach the file.
Also attached is an image of the FPS meter.
#21 - November 02, 2018, 08:19:09 AM
Attachments:

  • Newbie
  • Posts: 30
  • Points: 0
  • Likes Received: 4
  • Reputation: +1/-0
I downloaded it from the website on your image.

I attach the file.
Also attached is an image of the FPS meter.

Ahh,

that is a comercial site, where you can get some int. free indis....now I see.

You can´t work with that as it is not the source file mq4....

But as I said, if enough people show support and interest and write something, give likes etc, maybe the pros will code it.
#22 - November 02, 2018, 08:25:53 AM

  • Newbie
  • Posts: 30
  • Points: 0
  • Likes Received: 4
  • Reputation: +1/-0
I downloaded it from the website on your image.

I attach the file.
Also attached is an image of the FPS meter.
Here is one,


but it needs repair, doesn`t work (showing no lines)

but maybe you can use the code for the project.

#23 - November 02, 2018, 08:45:31 AM
Attachments:

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
I downloaded it from the website on your image.

I attach the file.
Also attached is an image of the FPS meter.

Ahh,

that is a comercial site, where you can get some int. free indis....now I see.

You can´t work with that as it is not the source file mq4....

But as I said, if enough people show support and interest and write something, give likes etc, maybe the pros will code it.
I can still work with, as I can use the outputs to send Alerts when certain conditions are met. EG, if the M15 crosses up, and the other 2 timeframes are also up.
#24 - November 02, 2018, 08:54:10 AM

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
I don't understand if you say it doesn't draw lines.
Attached is an image with the indi's loaded from the mql version you posted.
Do you want it to draw vertical lines on line crosses?
#25 - November 02, 2018, 09:13:28 AM
Attachments:

  • Newbie
  • Posts: 30
  • Points: 0
  • Likes Received: 4
  • Reputation: +1/-0
I don't understand if you say it doesn't draw lines.
Attached is an image with the indi's loaded from the mql version you posted.
Do you want it to draw vertical lines on line crosses?

...No, I meant it doesn`t show rsi line.

Put it on again, changed something in the code (and back) click button compile and voila, there is the rsi line.

Absolute no vertical lines needed.

I guess you need a different one to code my idea as it is not interpolated in mtf mode, but I can`t find one.
#26 - November 02, 2018, 09:46:27 AM
« Last Edit: November 02, 2018, 09:49:51 AM by Drax »

Administrator
  • Hero Member
  • Posts: 5117
  • Points: 29366
  • Likes Received: 5122
  • Reputation: +220/-14
I understood from Admin's previous post, I must put it in an array, and that is where I loose it, :-) , any suggestions?
I will give you an example soon.
#27 - November 02, 2018, 01:37:32 PM

Loukie in MT4 / MT5 EAs_topic=585

Administrator
  • Hero Member
  • Posts: 5117
  • Points: 29366
  • Likes Received: 5122
  • Reputation: +220/-14
I understood from Admin's previous post, I must put it in an array, and that is where I loose it, :-) , any suggestions?

Here is an example of using an array and a cycle. Keep in mind that I have not tested this code and there may be improvements needed. This should give you an idea though.

Here is the code from your script:

Code: [Select]
string c01 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_32:rd_168_48:id00:#EURUSDwnd|cWnd0",OBJPROP_TEXT) ;  
string c02 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_48:rd_168_64:id00:#GBPUSDwnd|cWnd1",OBJPROP_TEXT) ;
string c03 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_64:rd_168_80:id00:#AUDUSDwnd|cWnd2",OBJPROP_TEXT) ;  
string c04 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_80:rd_168_96:id00:#USDJPYwnd|cWnd3",OBJPROP_TEXT) ;
string c05 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_96:rd_168_112:id00:#USDCHFwnd|cWnd4",OBJPROP_TEXT) ;  
string c06 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_112:rd_168_128:id00:#USDCADwnd|cWnd5",OBJPROP_TEXT) ;
string c07 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_128:rd_168_144:id00:#EURAUDwnd|cWnd6",OBJPROP_TEXT) ;  
string c08 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_144:rd_168_160:id00:#EURCADwnd|cWnd7",OBJPROP_TEXT) ;
string c09 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_160:rd_168_176:id00:#EURCHFwnd|cWnd8",OBJPROP_TEXT) ;  
string c10 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_176:rd_168_192:id00:#EURGBPwnd|cWnd9",OBJPROP_TEXT) ;
string c11 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_192:rd_168_208:id00:#EURJPYwnd|cWnd10",OBJPROP_TEXT) ;  
string c12 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_208:rd_168_224:id00:#GBPJPYwnd|cWnd11",OBJPROP_TEXT) ;
string c13 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_224:rd_168_240:id00:#GBPCHFwnd|cWnd12",OBJPROP_TEXT) ;  
string c14 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_240:rd_168_256:id00:#NZDUSDwnd|cWnd13",OBJPROP_TEXT) ;
string c15 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_256:rd_168_272:id00:#AUDCADwnd|cWnd14",OBJPROP_TEXT) ;  
string c16 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_272:rd_168_288:id00:#AUDJPYwnd|cWnd15",OBJPROP_TEXT) ;
string c17 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_288:rd_168_304:id00:#CHFJPYwnd|cWnd16",OBJPROP_TEXT) ;  
string c18 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_304:rd_168_320:id00:#AUDNZDwnd|cWnd17",OBJPROP_TEXT) ;
string c19 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_320:rd_168_336:id00:#NZDJPYwnd|cWnd18",OBJPROP_TEXT) ;  
string c20 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_336:rd_168_352:id00:#NZDCADwnd|cWnd19",OBJPROP_TEXT) ;
string c21 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_352:rd_168_368:id00:#GBPNZDwnd|cWnd21",OBJPROP_TEXT) ;  
string c22 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_368:rd_168_384:id00:#EURNZDwnd|cWnd22",OBJPROP_TEXT) ;
string c23 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_384:rd_168_400:id00:#GBPCADwnd|cWnd23",OBJPROP_TEXT) ;  
string c24 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_400:rd_168_416:id00:#GBPAUDwnd|cWnd24",OBJPROP_TEXT) ;
string c25 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_416:rd_168_432:id00:#AUDCHFwnd|cWnd25",OBJPROP_TEXT) ;
string c26 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_432:rd_168_448:id00:#CADCHFwnd|cWnd26",OBJPROP_TEXT) ;  
string c27 = ObjectGetString(0,"wnd:z_1??:c_69:lu_8_448:rd_168_464:id00:#CADJPYwnd|cWnd27",OBJPROP_TEXT) ;





Here is a better way to do it:


Code: [Select]
string c[27];

 for (int i=ObjectsTotal()-1;i>=0;i--)//cycle through all objects on chart
   {
    string name=ObjectName(i);
    if (StringFind(name,"wnd:z_1??:c_69:")==-1)continue;//all objects start with this same string so filter out other objects (eg. from other indicators)
   
    for (int a=0;a<27;a++)//we will assign the 27 different symbols to the array
     {
      if (StringFind(name,StringConcatenate("cWnd",a))==-1)continue;//assign the symbol to the same array position in order
      string text = ObjectGetString(0,name,OBJPROP_TEXT);
     
      int pos = StringFind(text,"id00:#");//find position in text prior to where symbol will be
      if (pos==-1)continue;//not an object we need to consider
     
      c[a]=StringSubstr(text,pos+1,6);
     }
   }




A similar method could be used to get the values too. It may even be possible to find both the symbol and value at the same time with the same code. This is just an example though.

I think you asked before about the EA being able to check a symbol and value, trade if needed, and then go on to another symbol and so on. Once your data is in arrays, I think it's easier to work with. You can just have your EA cycle through the arrays you have instead of writing similar code over and over again.
#28 - November 02, 2018, 11:06:44 PM

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
Thanks a million. 
It's amazing how easy you make it look
#29 - November 03, 2018, 05:37:35 AM

Members:

0 Members and 1 Guest are viewing this topic.