Re: Coding Help

1692
hi all can any one help me on the attached indicator thanks in advance

this is the errors

OnCalculate function declared with wrong type or/and parameters EntryConfirmationV2.mq4 54 5
OnCalculate function not found in custom indicator 1 1
'oscBuffer' - invalid array access EntryConfirmationV2.mq4 71 64
'oscBuffer' - invalid array access EntryConfirmationV2.mq4 71 64
"The goal of a successful trader is to make the best trades. Money is secondary."

Re: Coding Help

1694
Dear Mr Tools ,

I think this is the last puzzle piece so that I can improve in Trading, I love this Business.

I am asking you if it is possible to create an indicator that draws a vertical line in D1 on a particular date. By zooming in to Low Time Frame, the whole day is marked by a color on the font.

With respect, I hope this little hint gives you inspiration :

int lookBack = 100; // no of days you wanna look back
for(int i=100;i>=0;i--)
{
datetime dailyTime=iTime(Symbol(),1440,i);
string name=TimeToStr(dailyTime)+" Time_Vertical_Line";
if(TimeDay(dailyTime)==14 && ObjectFind(0,name)<0)
{
if(!ObjectCreate(0,name,OBJ_VLINE,0,dailyTime,0))
Print("Fail to draw the line ERROR CODE : ",GetLastError());
ObjectSet(name,OBJPROP_WIDTH,width);
ObjectSet(name,OBJPROP_COLOR,Color);
ObjectSet(name,OBJPROP_BACK,true);
}
}


Thank you always for your help!

Re: Coding Help

1695
hello i wanted to know if someone was looking for help/advice etc for converting indicators into EA code. where would be a good place to do that?? to go
ill likely figure out what i need though i go in-between problems and while trying to hash out the details wonder what resources are out there. if you can point me in the right direction i would appreciate it. right now i am trying to convert MA filters from indicator to ea. i have been getting print statements outputing the smoothed values though have been running into issues asigning a trend based on the comparison of the values and think it is most likely a difference in the platforms tolerance between indicator and ea. it is likely be solved with an elipson tolerance properly implemented but while i am figuring it out was wondering where to reference or post concerning a topic like this was looking at the mql5 algorithm trading forum and was wonderingif there was space here or else where? thanks any suggestions are appreciated thank you.


Re: Coding Help

1696
Lwqa wrote: Tue Nov 05, 2024 11:59 pm Dear Mr Tools ,

I think this is the last puzzle piece so that I can improve in Trading, I love this Business.

I am asking you if it is possible to create an indicator that draws a vertical line in D1 on a particular date. By zooming in to Low Time Frame, the whole day is marked by a color on the font.

With respect, I hope this little hint gives you inspiration :

int lookBack = 100; // no of days you wanna look back
for(int i=100;i>=0;i--)
{
datetime dailyTime=iTime(Symbol(),1440,i);
string name=TimeToStr(dailyTime)+" Time_Vertical_Line";
if(TimeDay(dailyTime)==14 && ObjectFind(0,name)<0)
{
if(!ObjectCreate(0,name,OBJ_VLINE,0,dailyTime,0))
Print("Fail to draw the line ERROR CODE : ",GetLastError());
ObjectSet(name,OBJPROP_WIDTH,width);
ObjectSet(name,OBJPROP_COLOR,Color);
ObjectSet(name,OBJPROP_BACK,true);
}
}


Thank you always for your help!
Like this?
These users thanked the author kysbog for the post:
Lwqa

Re: Coding Help

1697
kysbog wrote: Wed Nov 06, 2024 12:06 pm Like this?
Thank you for your contribution Friend!
I tested it, but your indicator draws the Box every day. What I want is for an indicator to draw the vertical line on the particular date of each month that we want to set.
Let's take an example: If we put september 19 on the indicator parameters. On September 19, there will be the formation of the vertical line in D1, which will be represented by a Box in M15.

Thanks again!

IndicatorRe: Coding Help

1698
Hello... Please is it possible to add HistoryBars to this indicator, so that one may have control on how far back it will show it's history? It slows down MT4 performance and I think that's because of too much historical data being displayed. 2ndly a capability to change to any color of one choosing will be much appreciated as well. And 3rdly adding an alert also will be perfect. I thank you in advance.

Re: Coding Help

1699
KingReason wrote: Fri Nov 08, 2024 7:35 pm Hello... Please is it possible to add HistoryBars to this indicator, so that one may have control on how far back it will show it's history? It slows down MT4 performance and I think that's because of too much historical data being displayed. 2ndly a capability to change to any color of one choosing will be much appreciated as well. And 3rdly adding an alert also will be perfect. I thank you in advance.
Hello, sorry but think that indicator needs to be completely recoded.

Re: Coding Help

1700
KingReason wrote: Fri Nov 08, 2024 7:35 pm Hello... Please is it possible to add HistoryBars to this indicator, so that one may have control on how far back it will show it's history? It slows down MT4 performance and I think that's because of too much historical data being displayed. 2ndly a capability to change to any color of one choosing will be much appreciated as well. And 3rdly adding an alert also will be perfect. I thank you in advance.
Try;
These users thanked the author Ogee for the post (total 2):
mrtools, KingReason


Who is online

Users browsing this forum: No registered users and 5 guests