Jump to content

MQL5 - HIstorical Camarilla- Need HELP for easy mod


berusnet

Recommended Posts

hi !

I'm a fan of camarilla pivots . By serveral years I use amibroker to calculate plot and in every frames.

I have found in mql5 web site a free indicator "camarilla historical".

Here a link to full easy code. http://www.mql5.com/en/code/viewcode/1680/20984/cam_h2_h5_historical__3.mq5

 

It calculate the classic daily pivots based on previous daily High Low Close.

 

I want add a input parameter "timeframe" so I can calculate them from High Low Close of H1 H4 Week Monthly or others frame.

I'm new to mql5 but I tried :

 

added this

input ENUM_TIMEFRAMES      period=PERIOD_D1;

and changed this part of coe

  ArraySetAsSeries(Time,true);
  ArraySetAsSeries(Low,true);
  ArraySetAsSeries(High,true);
  ArraySetAsSeries(Close,true);

with this

 

  ArraySetAsSeries(Time,true);
  CopyTime(_Symbol,period,0,rates_total,Time);
  ArraySetAsSeries(Low,true);
  CopyLow(_Symbol,period,0,rates_total,Low);
  ArraySetAsSeries(High,true);
   CopyHigh(_Symbol,period,0,rates_total,High);
  ArraySetAsSeries(Close,true);
   CopyClose(_Symbol,period,0,rates_total,Close);

 

But i get errors whem compiled :(

 

Can somene help me with this mod ? Please please ..so i can remove amibroker

 

Big thanks in advance !

Link to comment
Share on other sites

sorry im ******, i have read something more about mql5 and found that my mod can't work. So forgot it.

the only things that is right :

 

input ENUM_TIMEFRAMES      period=PERIOD_D1;

 

Can someone suggest how I can do ? Which changes to OnCalculate function to work on obtain HLC from period ?

 

thanks :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...