Need help for creating the 200MA_System

#11
Thanks to all of you, Thanks KelvinHand for the code.

I got the list with buy and sell signals!


If I want to check signals historically do I have to do it manually ? Or is there a possibility to get the number of Stocks each day for example:

07/01/13 = 20 Stocks in Buy-Modus
07/02/13 = 19 Stocks in Buy-Modus
07/03/13 = 20 Stocks in Buy-Modus

Thanks for reply

regards
masiegp
 

KelvinHand

Well-Known Member
#12
Thanks to all of you, Thanks KelvinHand for the code.

I got the list with buy and sell signals!


If I want to check signals historically do I have to do it manually ? Or is there a possibility to get the number of Stocks each day for example:

07/01/13 = 20 Stocks in Buy-Modus
07/02/13 = 19 Stocks in Buy-Modus
07/03/13 = 20 Stocks in Buy-Modus

Thanks for reply

regards
masiegp
There are restriction in doing the script, Here the twist:

- Create a watchlist name, say "Nifty"
- enter into the parameter window.
- exploration
- *Total*, see the nBuys and nSells of the index.
- nTotal display the no. of stocks in your Nifty watchlist.



PHP:
sWatchList = ParamStr("Watch List", "DJI");

wlno = CategoryFind(sWatchList, categoryWatchlist ); 
List = CategoryGetSymbols(categoryWatchlist, wlno ); 

nTotal=0;

for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ ) 
{
 nTotal++;

/*****************************************************
  Suppose to do looping to calculate the nBuys, nSell & nTotal here
  using the foreign().

  Not able to tally the statistic from the exploration.
  Maybe some other people can carry over the idea. 

******************************************************/


} 



MA1  = MA(C, 200);
MA1_1 = Ref(MA1,-1);


Buy = C>MA1 AND MA1>MA1_1;
Sell =C<MA1 AND MA1<MA1_1;

Filter = (Buy OR Sell); 


SetOption("NoDefaultColumns", True );
AddTextColumn( Name(), "Ticker",1, colorDefault,colorDefault, 66);
AddTextColumn( FullName(), "Stock",1, colorDefault,colorDefault,222);
AddColumn( DateTime(), "Date", formatDateTime, colorDefault,colorDefault, 77 );
AddColumn(C, "Close", 1.3, colorDefault, colorDefault, 66);
AddColumn(V, "Volume", 1.0, colorDefault,colorDefault, 77);

AddColumn( IIf( Buy, 1, 0), "nBuys", 1.0, colorDefault,colorDefault,55 ); 
AddColumn( IIf( Sell,1, 0), "nSells", 1.0, colorDefault,colorDefault,55 ); 
AddColumn( nTotal, "nTotals", 1.0, colorDefault,colorDefault,55 ); 



AddSummaryRows(1, 1.0, 6, 7); 

SetSortColumns(4,5);
Other way to play around is to use the Window Script to manipulate using the watchlist OR
using Ami to excel automation.

I not going to do that for you, see any expert here to help you.
 
Last edited:

Similar threads