Morning all
can someone please assist me with the following;
I would like to buy a stock tomorrow only if it trades higher than todays high.
this is my code so far. However it keeps buying at the open price.
Cond8 = buyprice >= Ref(high + (high * 0.005), -1);
thanks
thanks for your feedback Gringotts.
unfortunately my code is still not working.
it is still buying on the signal bar when i work like it to buy when the price
cross the previous days high.
Just a thought:
....
FOR 15 MINUTE , IT GIVES WRONG OUTPUT, USE BELOW CODE AND SEE BY YOURSELF
exploration should show candle time of 15min. bull candle
Code:Plot( C, "Close", ParamColor( "Color", colorDefault ), styleNoTitle | ParamStyle( "Style" ) | GetPriceStyle() ); expandmode = expandfirst; TF = in15Minute; TimeFrameSet( TF ); dt = DateTime(); bull = C>O; TimeFrameRestore(); fifteen = TimeFrameExpand( dt, TF, expandmode ); fifteenn = TimeFrameExpand( bull, TF, expandmode ); printf( "`15 Minute candle timeframe: " + DateTimeToStr( SelectedValue( fifteen ) )); Filter = bull; AddColumn( dt, "Date", formatDateTime );
All are Welcome
Plot( C, "Close", ParamColor( "Color", colorDefault ), styleNoTitle | ParamStyle( "Style" ) | GetPriceStyle() );
expandmode = expandfirst;
TF = in15Minute;
TimeFrameSet( TF );
dt = DateTime();
bull = C>O;
TimeFrameRestore();
fifteen = TimeFrameExpand( dt, TF, expandmode );
fifteenn = TimeFrameExpand( bull, TF, expandmode );
printf( "`15 Minute candle timeframe: " + DateTimeToStr( SelectedValue( fifteen ) ));
Filter = fifteenn;
AddColumn( fifteen, "Date", formatDateTime );
Plot( C, "Close", ParamColor( "Color", colorDefault ), styleNoTitle | ParamStyle( "Style" ) | GetPriceStyle() );
expandmode = expandFirst;
TF = in15Minute;
TimeFrameSet( TF );
dt = DateTime();
bull = C>O;
TimeFrameRestore();
expanddt = TimeFrameExpand( dt, TF, expandmode );
expandbull = TimeFrameExpand( bull, TF, expandmode );
printf( "`15 Minute candle timeframe: " + DateTimeToStr( SelectedValue( expanddt ) ));
for( i = BarCount-1; i >= BarCount -8 ; i-- )
{ newexpand ="";
newexpand += DateTimeToStr( expanddt[i] );
}
Filter = 1;
//AddColumn( newexpand, "Date", formatDateTime ); //eXPANDED VARIABLE
//AddColumn( expandbull, "bull", 1, colorDefault, colorDefault, 70 ); (EXPANDED vARIABLE?)
AddColumn( Null, "DateTime", 1, colorDefault, colorDefault, 160 );
"Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe."
Hi, I'm using Premium Data and one watchlist "ASX - Franked Dividend Paying" I'd like to backtest stocks with a long history in this watchlist.
Is there a way to exclude stocks with say less than 10 years of data please?
Run an exploration with date set at 10 years ago (day = Mon-Fri), then add the results to a watchlist.
Filter = IsTrue(Close) ;
Addcolumn(v*C,"IVT");
In the Symbols section find "Watch Lists" and then scroll down through the list until you come to the list of stocks you want. I.e. ---
View attachment 69027
(You mean expanding into higher time frame)Hi All,
I'm currently using an hourly data base, for which I am compressing into 2 or 4 hour bars on the chart using TimeFrameCompress.
(You mean expanding into higher time frame)
1. If you set the Base Time Interval to 1 minute in Database Settings then you will save data from 1 minute upwards and not be restricted to 1 hour.
2. In Tools -> Preferences -> Intraday, Custom Time Intervals can be set.
This is my 1 minute database on top Periodicity and EOD database below Periodicity.
View attachment 69093View attachment 69094
I have since corrected the faulty database to open with my original database BUT
MY TRENDLINES HAVE STILL DISAPPEARED ALONG WITH MA'S & TICKERS IN MY CUSTOM WATCH LISTS
Ffs the norgate support are useless and can't work out why either. I told them everything was fine and dandy until i did the monthy 30day backup procedure. I have done that in the past many times with no problems
Imagine that. A backup service that actually destroys days, upon days of charting
Now I have to redraw all my lines, ma's, watchlist tickers etc etc
I'm not sure I can be bothered. Has this happened to anyone?
Andrew
I'm sure the charts are there separate to those dwnloaded
I don't use ami but I think you have lost your smart charts ( thats what they call them in Metastock )
There are a few here who are Ami proficient
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?