Simple Coding Help - No Promise.

toughard

Well-Known Member
#31
Respected sir,
how to write an AFL with the logic's below?

EMA's are 12 24
If bullish crossover is in daily time frame and if bullish cross in 1/2/3/5/10/15/30/60min time frame then BUY and
and vice-versa.

please help.

toug
 

Cubt

Algo Trader
#32
Message centered on to the chart and will be seen as background

Code:
GfxSetOverlayMode(1);
GfxSelectFont("Comic Sans MS Bold", Status("pxheight")/15 );
[B][COLOR="Red"]GfxSetTextAlign( 6 );// center alignment[/COLOR][/B]
GfxSetTextColor( ColorRGB( 160, 160, 160 ) );
GfxSetTextColor( ColorHSB( 160, 0, 151 ) );
GfxSetBkMode(0); // transparent
GfxTextOut( "- MUNNI HAI SIRF PAISEWALO KE  - :D", Status("pxwidth")/2, Status("pxheight")/3 );
You can change the message, Font, size, color and even placement if you change the code a bit.

:) Happy
Happy,
Could you please tell me what are the different alignments available apart from Center ?? and what are the respective numbers?
 

sr114

Well-Known Member
#35
dear Happy_Singh and KelvinHand,

i like to know how Valid DIFF_METHODs - PERCENT(%) and POINTS($) can be written in amibroker?

here is two metastock formula using % and $..

1. oscp(1, 25, E, $)
2. zig( CLOSE, 5, % )

can you please translate above two formula to amibroker for example..
A..fans

In amibroker

OSCP-price oscillator is based on exponential moving averages and expressed in percentage terms. [ in MS u have the choice of the moving averages]

SYNTAX OscP( fast , slow )

ZIG ZAG - Calculates the minimum % change [same for zig in MS - choice of MAs ]

SYNTAX zig(ARRAY, change )

so if u want to express in point wise ($)- u have to do the calculation

rgds
 

amibrokerfans

Well-Known Member
#36
A..fans

In amibroker

OSCP-price oscillator is based on exponential moving averages and expressed in percentage terms. [ in MS u have the choice of the moving averages]

SYNTAX OscP( fast , slow )

ZIG ZAG - Calculates the minimum % change [same for zig in MS - choice of MAs ]

SYNTAX zig(ARRAY, change )

so if u want to express in point wise ($)- u have to do the calculation

rgds

yes thanks! you pinpointed ! here is what i found.. http://www.mail-archive.com/[email protected]/msg21984.html
 

augubhai

Well-Known Member
#38
AlertIF function has limitations that the chart must be active when this alert goes off . . .

So if you are in your kitchen munching something and the chart is active you will get the alert. . .
but if you are at the trading desk but browsing some interesting sites the alert may not sound . . . .
Happyji,

i have not tried this, but checking the syntax below gives me an idea...

RequestTimedRefresh( interval, onlyvisible = True )

if I implement this with onlyvisible = False, will the sound alert trigger for inactive windows too?
 
#39
A..fans

whenever u r in confusion read the manual again and again and again. its ur best teacher

u will get all the answer

thanks again

rgds

p.s = lets keep the thread of Happy less cluttered and concentrate on the afl queries only. sorry Happy for making it chaotic
Not being cluttered at all, we need all the help we can get . . .

i just started it and hopefully it will not remain my thread :)

And I really don't claim to know much about Amibroker . . .
but as you have pointed out . . .
i do refer to the manual and linked pages of Amibroker Lib


Wasn't there a dialogue in one of the Big B block busters . . .


Mere Pass Manual Hai :D



Cheers

:) Happy
 

sr114

Well-Known Member
#40
Not being cluttered at all, we need all the help we can get . . .

i just started it and hopefully it will not remain my thread :)

And I really don't claim to know much about Amibroker . . .
but as you have pointed out . . .
i do refer to the manual and linked pages of Amibroker Lib


Wasn't there a dialogue in one of the Big B block busters . . .


Mere Pass Manual Hai :D



Cheers

:) Happy
yes Happy

aptly said

Mere Pass Ma(nual) Hai

yes reading the manual clears all the confusion and then there is the famous mail archive of amibroker yahoo group which will provide u all the relevant answers

rgds
 

Similar threads