Simple Coding Help - No Promise.

amitrandive

Well-Known Member
sir please edit this afl according to
BUY AND COVER ON SAME SIGNAL
SELL AND SHORT ON SAME SIGNAL
1) as like buy ---sell+short---cover+buy----
2) as like sell ---buy+cover---short+sell----
one more problem is it only takes first signal as
buy
it naver takes if first signal was sell
please sir help
NOT WORKING I TESTET IT ON AMBIBROKER 9
Use AFL which I have posted.
 

pkgmtnl

Well-Known Member
sir please edit this afl according to
BUY AND COVER ON SAME SIGNAL
SELL AND SHORT ON SAME SIGNAL
1) as like buy ---sell+short---cover+buy----
2) as like sell ---buy+cover---short+sell----
one more problem is it only takes first signal as
buy
it naver takes if first signal was sell
please sir help
NOT WORKING I TESTET IT ON AMBIBROKER 9
After BUY SELL
add these codes , it will OK.

Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=Sell;
Cover=Buy;
 
Hi,

I'm new to AFL coding and have been trying to code some basic strategies. Could somebody help me with one issue? Below is a section of the code:

Buy1 = C > Buyband;
Sell1 = (C < Sellband);
ApplyStop(stopTypeLoss, stopModePercent, 11, ExitAtStop = 0, True, 0);
Buy = ExRem(Buy1, Sell1);
Sell = ExRem(Sell1, Buy1);

The Buyband and Sellband are Bbands. When I backtest, although the ApplyStop function does give me an exit it does not give me re-entry again unless and until the Sell is triggered. The re-entry bars have been set to 0 but the issue still persists.

Will really appreciate the support.

Many thanks.
 
Dear all seniors,

need help to develop exploration of Chikaoo span breakout.

Condition -

Need stocks which gives breakouts when chikoo span moves up with price... Pls check the chart.

Thanx you in advance
 
Last edited:

Similar threads