Simple Coding Help - No Promise.

Aman1

Well-Known Member
Can someone help with this--

1. when macd histogram ticks up color of candle = Blue
2. when macd ticks up color of candle = orange
3. when macd cross color of candle = Green
4. when macd histogram ticks down color of candle = blue
5. when macd ticks down color of candle = orange
6. when macd cross down color of candle = Red
All I could do was this:-

r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
McD=MACD(r1, r2);
sig=Signal(r1,r2,r3);
Hist=MCd- sig;

Buy1= Cross(McD,sig) ;
buy2=McD > Ref(McD,-1);
Sell1=Cross(sig,McD);
sell2=McD < Ref(McD,-1);
Buy=ExRem(Buy2,Sell2);
Sell=ExRem(Sell2,Buy2);

Color =IIf(Buy2,colorGreen,IIf(Sell2,colorRed,colorBlue));

SetBarFillColor(Color);

Plot(Close,"Close",colorWhite,styleCandle);
shape = Buy1 * shapeUpArrow + Sell1 * shapeDownArrow;
PlotShapes( shape, IIf( Buy1, colorYellow, colorRed ), 0, IIf( Buy1, Low, High ) );
GraphXSpace = 5;


Could not Succeed in adding histgram change color(point no.4in original post) in this. Can anyone please help here?
 

amitrandive

Well-Known Member
Hello Friends

I am starting this thread for helping anyone who requires small changes in AFLs or AFL coding done for small / simple requirements that can be clearly defined.

What does not go is conversion . . . from Amibroker to anything else . . . or from anything else to Amibroker . . .

Debugging requested for copy/paste AFLs, Please don't post huge AFLs with zillions of lines of code for debugging

I will not be available for any conversions and I am not interested in debugging some-one else's copy/pasted work and lastly . . .
Not interested in hacking/craking any ones work . . .

Only if have a clearly definable task to be coded I maybe able to help . . . No Promises but will try within my limitations . . .





Cheers

:) Happy

Rules were already defined in the first post.

:D
 
All I could do was this:-

r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
McD=MACD(r1, r2);
sig=Signal(r1,r2,r3);
Hist=MCd- sig;

Buy1= Cross(McD,sig) ;
buy2=McD > Ref(McD,-1);
Sell1=Cross(sig,McD);
sell2=McD < Ref(McD,-1);
Buy=ExRem(Buy2,Sell2);
Sell=ExRem(Sell2,Buy2);

Color =IIf(Buy2,colorGreen,IIf(Sell2,colorRed,colorBlue));

SetBarFillColor(Color);

Plot(Close,"Close",colorWhite,styleCandle);
shape = Buy1 * shapeUpArrow + Sell1 * shapeDownArrow;
PlotShapes( shape, IIf( Buy1, colorYellow, colorRed ), 0, IIf( Buy1, Low, High ) );
GraphXSpace = 5;


Could not Succeed in adding histgram change color(point no.4in original post) in this. Can anyone please help here?
Aman

Pls also post the image of price plus MACD plus histogram along with manual identification of what you want. I am unable to comprehend correct meaning of your rule-phrases...
 

Aman1

Well-Known Member
Thanks mastermind007.

I have abandoned my quest for this afl.

Thanks for trying to help me.

And I'm sorry I troubled you all.
 
Last edited:

Nehal_s143

Well-Known Member
Also, if complexity of converting from MT4 to AmiBroker is X, then converting the exact same logic from AmiBroker to MT4 is 5 times X. Innumerable complications exist primarily due to the way in which both of the software handle back-referencing and data arrays.

This thread, as its name clearly reveals, is for "Simple Coding Help ....". Generally such help can be and is provided for free and w/o any return expectation.

My personal rule of thumb is anything that can be solved in less than half-hour and without need of any extensive testing can be included here.

Anyone needing advanced help needs to appreciate and understand that complicated problems cannot be handled in this thread. Also, frequently, we find questions that have already been answered either earlier in this thread or elsewhere in this website. Those seeking solutions need to be willing to look around.

P.S. I hope that Happy Singh agrees with the practical interpretation attempted by me here....
New users to this thread are requested to search for your solution in old post, some time it already there, even in google. Problem arise when some users seek spoon feeding, sorry if I sound harsh.....
 

amitrandive

Well-Known Member
New users to this thread are requested to search for your solution in old post, some time it already there, even in google. Problem arise when some users seek spoon feeding, sorry if I sound harsh.....
One more request.
Please be patient.There is nothing such as an urgent request.
If no one has replied ,it may also mean that probably they may be busy in their other activities, do not know the solution,or such coding may not be logically possible.
 


you are right i guess , it may be from afl

can we stop it?
Those windows are called Tooltips. In earlier versions, you were able to control the contents shown... That feature seems to have been deprecated.

You can remove them altogether by Tools->Preferences->Misc* -> Price data tooltips or reduce the time they remain on screen by reducing its auto-hide timeout.
 

Similar threads