Simple Coding Help - No Promise.

Don't use -1. Current close has to be compared with last n bar range including current bar else in BO /BD it will go out of range
But it is going out of range even without -1, when I am using simple LoLow = LLV(L, pds) . Can u xplain why is it so?

One more query (to finish my Stochs learning - as I value its divergences):
How to incorporate IFF or IF statement properly here:
y0=LastValue( Trough(StochD( periods , Ksmooth, DSmooth ),1,2));
y1=LastValue( Trough(StochD( periods , Ksmooth, DSmooth ),1,1));
x0=BarCount - 1 - LastValue(TroughBars(StochD( periods , Ksmooth, DSmooth ),1,2));
price_start= Close[x0] ;
x1=BarCount - 1 - LastValue(TroughBars(StochD( periods , Ksmooth, DSmooth ),1,1));
price_end=Close[ x1];
Line = LineArray( x0, y0, x1, y1, 0 );
If y1>y0 AND price_end<price_start ...............
Plot( Line, "Support line", ParamColor( "BullD Color", colorGreen ), ParamStyle( "BullD Style", styleLine ) );
Thanks & Regards
 

toocool

Well-Known Member
Is it possible to make an afl to show explored stocks on some parameters ?

I am sorry if I sound ridiculous but I have little idea about upto what extent an afl works
 
Need two Help..

1. I want to plot a vertical line(or other shape) at the 10th bar in the past from today, without a specific signal. How to do it.


2. I have a function exporting symbol (and data) stored in a watchlist to a CSV file after scan (or exploration) of selected WL, and this work well.

But I have a problem I want the first line ii this .CSV file with a name of selected watchlist scanned (or explored), How I can resolve my problem?

I've tried this (below) with "Title1" but put in a line "ALL" name WL where the symbol scanned are stored.
I want only name of WL scanned.

---------------------------
Title1 = "";
for( i = 0; CategoryGetName( categoryWatchlist, i )!= ""; i++ )
{
if( InWatchList( i ) )
Title1 = Title1 + CategoryGetName( categoryWatchlist, i );
}

....
....
....

[I've cut the rest, but tell me if you want complete formula]
----------------------------------

Thanks in advance for help. :sos:
 
Re: Need two Help..

1. I want to plot a vertical line(or other shape) at the 10th bar in the past from today, without a specific signal. How to do it.


2. I have a function exporting symbol (and data) stored in a watchlist to a CSV file after scan (or exploration) of selected WL, and this work well.

But I have a problem I want the first line ii this .CSV file with a name of selected watchlist scanned (or explored), How I can resolve my problem?

I've tried this (below) with "Title1" but put in a line "ALL" name WL where the symbol scanned are stored.
I want only name of WL scanned.

---------------------------
Title1 = "";
for( i = 0; CategoryGetName( categoryWatchlist, i )!= ""; i++ )
{
if( InWatchList( i ) )
Title1 = Title1 + CategoryGetName( categoryWatchlist, i );
}

....
....
....

[I've cut the rest, but tell me if you want complete formula]
----------------------------------

Thanks in advance for help. :sos:
[I think] I've resolved the first (coud be good for you?):

put signal at 51th bars ago (included today):
nbarsago = BarIndex() == LastValue( BarIndex() - 50 );


Remain the second question (It is hard for me I'm not a programmer...),
anyone could help me?
 
Last edited:
@pratap @kelvin @happy singh

Thanks for all your efforts to help the beginners and the needy.

Can you pls code the follg simple strategy ? I am new to ami and I donot know coding. Help from any member wud be of immense help to me.

Its ORB trading system on stocks.

TF for range: 15mins.

Buy: Abv the 15min high which has OL
Sl: Just blow the low of 15min range.
Tgt: 60% exit at 1:1 risk/reward ratio. balance at 1.618/2 R:R.
If both SL and tgt not triggered, close the posn at 3p.m.

Sell: Blow the 15min range of stocks which has OH same.
SL : Just abv the high of 15min tf.
Tgt: 60% exit at 1:1 RR and balance at 1.618/2 RR
If both SL and tgt not triggered, close the posn at 3p.m.

Hope Pratap sir will help as he is active in this thread.

warm regards,
 
Last edited:

pratapvb

Well-Known Member
@pratap @kelvin @happy singh

Thanks for all your efforts to help the beginners and the needy.

Can you pls code the follg simple strategy ? I am new to ami and I donot know coding. Help from any member wud be of immense help to me.

Its ORB trading system on stocks.

TF for range: 15mins.

Buy: Abv the 15min high which has OL
Sl: Just blow the low of 15min range.
Tgt: 60% exit at 1:1 risk/reward ratio. balance at 1.618/2 R:R.
If both SL and tgt not triggered, close the posn at 3p.m.

Sell: Blow the 15min range of stocks which has OH same.
SL : Just abv the high of 15min tf.
Tgt: 60% exit at 1:1 RR and balance at 1.618/2 RR
If both SL and tgt not triggered, close the posn at 3p.m.

Hope Pratap sir will help as he is active in this thread.

warm regards,
Did not understand OH and OL part. And is this w.r.t. 1st bar? Will not be able to do any major stuff as I keep doing someethings of my own in terms of r&d so no gurantees
 
Did not understand OH and OL part. And is this w.r.t. 1st bar? Will not be able to do any major stuff as I keep doing someethings of my own in terms of r&d so no gurantees
Hi,

Yes. Open = low of first bar (15tf) of the day for buy
open = high of first bar (15tf) of the day for sell.
i.e. We will trade ORB of stocks which display either OL or OH for the day/first bar in 15tf

Pratap sir, pls help me in coding this afl. It won't take much time for experts like you. I am sure that this will be very minor work with your vast knowledge.

This is my request.

Regards,
 

Similar threads