Simple Coding Help - No Promise.

@happysing @ amit and other seniors..... please see this attached image of backtest......first part is of 5-8 years of data from internet/traderji(only nifty).....second part is only april month from nest trader....:thumb:


please suggest which of the following strategy is best based on sample data ...would appreciate if provided an explanation like factor affector good or bad judegement apart from prf like payoff ratio and so on.....:)



april month all the strategy had incureed losses...only last few days changed them into profit zone....:clapping:
:)
How have you backtested ? Can you share the backtesting code.... I ma having trouble backtesting ... want to understand how it is done
 
diff ticker name

hello my amibroker data has following symbols,

20MICRONS
3IINFOTECH
3MINDIA
8KMILES
A2ZMES
AARTIDRUGS
AARTIIND
AARVEEDEN
ABAN

but the data I am importing in OI field has following symbol name

20 Microns
3i Infotech
3M India
8K Miles Soft
A2Z Infra Eng
Aarti Drugs
Aarti Ind
Aarvee Denim
Aban Offshore

my data symbols are all capital without space(NSE symbol nme),but the data I am importing now has different symbol name with space too(moneycontrol.com data)
how can I import data when symbols are not same ?
 

manishchan

Well-Known Member
Re: diff ticker name

hello my amibroker data has following symbols,

20MICRONS
3IINFOTECH
3MINDIA
8KMILES
A2ZMES
AARTIDRUGS
AARTIIND
AARVEEDEN
ABAN

but the data I am importing in OI field has following symbol name

20 Microns
3i Infotech
3M India
8K Miles Soft
A2Z Infra Eng
Aarti Drugs
Aarti Ind
Aarvee Denim
Aban Offshore

my data symbols are all capital without space(NSE symbol nme),but the data I am importing now has different symbol name with space too(moneycontrol.com data)
how can I import data when symbols are not same ?
I assume you have data in csv file since you are importing from moneycontrol. Do this -

Step 1 to remove the spaces : Select the symbol column - Ctrl+H - give just a space in "Find What" - leave the "Replace With" unchanged - Replace all.

Step 2 to change the case - Insert a column next to symbol - use this formula "=UPPER(select the symbol)" - copy paste in the entire column - copy n paste special the value.

Thats all .. Done !! :)
 
Re: diff ticker name

I assume you have data in csv file since you are importing from moneycontrol. Do this -

Step 1 to remove the spaces : Select the symbol column - Ctrl+H - give just a space in "Find What" - leave the "Replace With" unchanged - Replace all.

Step 2 to change the case - Insert a column next to symbol - use this formula "=UPPER(select the symbol)" - copy paste in the entire column - copy n paste special the value.

Thats all .. Done !! :)
Thanks manishchan
one more doubt Amibroker symbol is 8KMILES even if I change 8K Miles Soft to 8KMILESSOFT will Amibroker import it in the symbol 8KMILES as SOFT is extra?
also .........ABAN and ABANOFFSHORE ,OFFSHORE is extra
AARVEEDEN and AARVEEDENIM here IM is extra
 

manishchan

Well-Known Member
Re: diff ticker name

Thanks manishchan
one more doubt Amibroker symbol is 8KMILES even if I change 8K Miles Soft to 8KMILESSOFT will Amibroker import it in the symbol 8KMILES as SOFT is extra?
also .........ABAN and ABANOFFSHORE ,OFFSHORE is extra
AARVEEDEN and AARVEEDENIM here IM is extra
it won't.. here is wht you should do.

You hv to fix where you are getting your data from. In this example, moneycontrol... so just use the symbol that moneycontrol uses. Changing everytime will create diff scripts.
 
Last edited:

Blackhole

Well-Known Member
please comment ...on this repost
@happysing @ amit and other seniors..... please see this attached image of backtest......first part is of 5-8 years of data from internet/traderji(only nifty).....second part is only april month from nest trader....:thumb:


please suggest which of the following strategy is best based on sample data ...would appreciate if provided an explanation like factor affector good or bad judegement apart from prf like payoff ratio and so on.....:)



april month all the strategy had incureed losses...only last few days changed them into profit zone....:clapping:
:)
 
hi,

I need help with coding.

My requirement is below -

I have my resistance level based on the below formla

R=ValueWhen(Cross(MACDNEW,SIGNALNEW),C,1);

I want afl to loop through the values of R and give me alert if the CMP is within 1% range of the value of R.

Please help
 

rvlv

Active Member
Happy singh jee
other coding experts

Thanks to Happy singh jee for his help to me and to many of traderji forum new bees.


HTML:
bullclimax =C>Ref(C,1) AND V/MA(V,10)>=2.0 ;
bullrising = C>Ref(C,-1) AND V/MA(V,10)>=1.5 ;
bearrising = C<Ref(C,-1) AND V/MA(V,10) >=1.5 ;
bearclimax = C <Ref(C,-1) AND V/MA(V,10) >=2.0 ;
//These are the basic conditions

Plot( Volume, _DEFAULT_NAME(), IIf( bullclimax, ParamColor("bull climax Color", colorAqua ), IIf( bearclimax, ParamColor("bear climax Color", colorYellow ,colorGrey50 ,ParamStyle( "Style", styleHistogram | styleThick, maskHistogram ));
Can you help fix this afl please
This is sonic pva mt4 code.
please refer to it at location
http://www.traderji.com/amibroker/92290-mt4-afl.html
hope somebody can put this in afl form
somebody who knows mt4 can do it easily.
can somebody help start the code
then other expert can push it through
-----------------------------------------------
bullclimax =C>Ref(C,1) AND V/MA(V,10)>=2.0 ;
bullrising = C>Ref(C,-1) AND V/MA(V,10)>=1.5 ;
bearrising = C<Ref(C,-1) AND V/MA(V,10) >=1.5 ;
bearclimax = C <Ref(C,-1) AND V/MA(V,10) >=2.0 ;
//These are the basic conditions

Plot( Volume, _DEFAULT_NAME(), IIf( bullclimax, ParamColor("bull climax Color", colorAqua ), IIf( bearclimax, ParamColor("bear climax Color", colorYellow ,colorGrey50 ,ParamStyle( "Style", styleHistogram | styleThick, maskHistogram ));
=====================================
This plot line has error.
can somebody fix it please
once it is fixed you have basic skeleton afl.
 

amitrandive

Well-Known Member
Happy singh jee
other coding experts

Thanks to Happy singh jee for his help to me and to many of traderji forum new bees.


HTML:
bullclimax =C>Ref(C,1) AND V/MA(V,10)>=2.0 ;
bullrising = C>Ref(C,-1) AND V/MA(V,10)>=1.5 ;
bearrising = C<Ref(C,-1) AND V/MA(V,10) >=1.5 ;
bearclimax = C <Ref(C,-1) AND V/MA(V,10) >=2.0 ;
//These are the basic conditions

Plot( Volume, _DEFAULT_NAME(), IIf( bullclimax, ParamColor("bull climax Color", colorAqua ), IIf( bearclimax, ParamColor("bear climax Color", colorYellow ,colorGrey50 ,ParamStyle( "Style", styleHistogram | styleThick, maskHistogram ));
Can you help fix this afl please
This is sonic pva mt4 code.
please refer to it at location
http://www.traderji.com/amibroker/92290-mt4-afl.html
hope somebody can put this in afl form
somebody who knows mt4 can do it easily.
can somebody help start the code
then other expert can push it through
-----------------------------------------------
bullclimax =C>Ref(C,1) AND V/MA(V,10)>=2.0 ;
bullrising = C>Ref(C,-1) AND V/MA(V,10)>=1.5 ;
bearrising = C<Ref(C,-1) AND V/MA(V,10) >=1.5 ;
bearclimax = C <Ref(C,-1) AND V/MA(V,10) >=2.0 ;
//These are the basic conditions

Plot( Volume, _DEFAULT_NAME(), IIf( bullclimax, ParamColor("bull climax Color", colorAqua ), IIf( bearclimax, ParamColor("bear climax Color", colorYellow ,colorGrey50 ,ParamStyle( "Style", styleHistogram | styleThick, maskHistogram ));
=====================================
This plot line has error.
can somebody fix it please
once it is fixed you have basic skeleton afl.
Bull climax and bear climax color plotted on volume.

Code:
bullclimax =C>Ref(C,1) AND V/MA(V,10)>=2.0 ;
bullrising = C>Ref(C,-1) AND V/MA(V,10)>=1.5 ;
bearrising = C<Ref(C,-1) AND V/MA(V,10) >=1.5 ;
bearclimax = C <Ref(C,-1) AND V/MA(V,10) >=2.0 ;
Plot( Volume, _DEFAULT_NAME(), IIf( C>Ref(C,1), ParamColor("Bull climax Color", colorAqua ), ParamColor("Bear climax Color", colorYellow ) ), ParamStyle( "Style", styleHistogram | styleThick, maskHistogram  ) );
 

Similar threads