Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

ValueTrader

Members
  • Content Count

    81
  • Joined

  • Last visited

Posts posted by ValueTrader


  1. This looks like just the job, thanks BF. Tams, was about to post my diagrams when BF posted the solution, but thanks for the offer of help. Also, where can I find more litriture on EL? I currently have 'getting started' and a reference of reserved words. I did a search of these pdfs, but found nothing relating to time as shown in BF's code. Thanks


  2. I'm having difficulty attempting to code a simple show-me study.

     

    I'm Looking for the high / low of a period to be ploted.

     

    if the period is eg 30 min, i need it to start at the top of the hour and end half past, then start again for the next 30mins.

     

    I tried this...on 2 min bars...

    
    if time > 1429 then begin
    plot1(highest(high,15))
    plot2(lowest(low,15))
    
    end
    

     

    but this gives me a running high and low with no freference to period boundrys, and will give me a high / low from 1445 to 1515. Whereas i need the study to show me the high and low of each 30min period.

     

    Does anyone also know a function that deletes the old high / low and plots the new one?

    as if new highs are being made during a run up i've ended up with a run of dots / lines.

     

    Thanks

     

    Valuetrader


  3. That works.

     

    I can see dots on entry points, I can now fine tune these in the indicator mode.

     

    I assume once im happy with the entrys i can simply change the plot statement to buy @ market for backtesting on the strat mode?

     

    Thanks TAMS

     

    VT


  4. Ok, Thanks TAMS:), I can now see whats happend... I added this code

    if open[2] < Lo then if Close > Lo Then Plot6(L,"Long"); 
    if open[2] > Uo then if Close < Uo Then Plot7(S,"Short");

     

    along with the associated Vars, to the Indicator, as OEC does not plot in strategy mode (maybe its the same in TS? i dont know), anyway, and my intermediate S&R that is

    Uo(0),Mid(0),Lo(0),Range(0)

    have dissapeared, so something in the commands

    if open[2] < Lo then if Close > Lo Then Plot6(L,"Long"); 

    is telling the Lo (which stands for Lower Octant) to change, instead of trading off it. This possibilty had already crossed my mind, but as i say my other strategys use varables (PVP,VWAP,Volume delta) all from home cooked indicators to signal entrys with no problem, so im still stumpped!


  5. Hello Everyone,

     

    I've been coding some EL automated stratgies on my OEC platform, with some success.

     

    The latest one is causing me problems however...

     

    The original code was 'Dynamic S&R' which if im correct, TAMS kindly posted on the forum.

     

    I made a couple of alterations to the original code, and as a result have a nice S&R indicator that works along the lines of Don Jones' Auction Market Value Theory Principles.

     

    The next logical step for me was to try to automate it into a strategy. However when i come to backtest, it isnt placing any orders. I've mest around with the wordings, setting and everything elsei can think of. Can anyone Help?

     

    All i need it to do is at least place some trades, i can then alter the parameters / conditions to suit. The Buy / Sell commands are exactly the same as other Codes i've done, So i'm obviously missing something. Thanking you all in advance

     

    inputs:
    
    
    iMode("No"),	{ if "auto" code sets xPeriods, if not "auto" code uses iPeriods}
    
    iPeriods(05),
    HighColor(  red), 
    LowColor(  blue) ;
    
    variables:
    
    xPeriods(60),
    xInterval(0),
    sFirstPass(true),
    HavePrevLines( false ), 
    TLHigh( 0 ), 
    TLLow( 0 ), 
    PushHigh( 0 ), 
    PushLow( 0 ),
    OldPushHigh( 0 ), 
    OldPushLow( 0 ),
    PrevPushHigh( 0 ), 
    PrevPushLow( 0 ) ,
    Uo(0),Mid(0),Lo(0),Range(0);
    
    {first time through}
    
    if sFirstPass
    then begin
    
    sFirstPass = false;
    
    {bar test}
    
    If bartype = 4
    then xInterval = 94
    else
    If bartype = 3
    then xInterval = 93
    else
    If bartype = 2
    then xInterval = 92
    else
    If bartype = 1
    then begin
    xInterval = BarInterval;
    end; { If bartype = 1  }
    
    {mode test}
    
    If iMode <> "Auto" and iMode <> "auto" and iMode <> "AUTO"
       then xPeriods = iPeriods
    else xPeriods = _fPushPeriods(xInterval);
    
    end; {if sFirstPass}
    
    {save old values}
    
    If PushHigh <> PrevPushHigh
    then OldPushHigh = PrevPushHigh;
    
    If PushLow <> PrevPushLow 
    then OldPushLow  = PrevPushLow ;
    
    OldPushHigh = PrevPushHigh ;
    OldPushLow = PrevPushLow ;
    
    PrevPushHigh = PushHigh ;
    PrevPushLow = PushLow ;
    
    { high / low for period }
    
    PushHigh = Highest( H, xPeriods);
    PushLow  = Lowest( L, xPeriods) ;
    
    If PushHigh <> H
    and PushHigh < PrevPushHigh
    then PushHigh = PrevPushHigh;
    
    If PushLow <> L
    and PushLow > PrevPushLow
    then PushLow = PrevPushLow;
    
    Range=PushHigh-PushLow;
    
    Uo=PushHigh-Range/8;
    
    Mid=Range/2+PushLow;
    
    Lo=PushLow+Range/8;
    
    //Removed plots from here//
    
    if open[2] < Lo then if Close > Lo  Then Buy next bar at Market; 
    if open[2] > Uo then if Close < Uo Then Sell Next Bar at Market;
    SetDollarTrailing(250);
    
    
    
    #function _fPushPeriods
    inputs: iInterval(NumericSimple); 
    variables: xPeriods(60); 
    { calculations } 
    If iInterval < 5 then xPeriods = 60 else 
    If iInterval < 10 then xPeriods = 45 else 
    If iInterval = 10 then xPeriods = 6 else 
    If iInterval = 15 then xPeriods = 12 else 
    If iInterval = 30 then xPeriods = 4 else 
    If iInterval = 60 then xPeriods = 6 else 
    If iInterval > 60 then xPeriods = 10; 
    _fPushPeriods = xPeriods;


  6. Hope i've understood your question correctly...

     

    PVP = The price with the most volume traded over a given period.

     

    POC = The price with the most TPOs (time/price opportunties) over a given period. Tpos come from market profile or a meta profile style chart.

     

    Knowing the TPO based POC or its computation are not required for using Jperl's techniques.


  7. Here is my fisrt attempt...

    Inputs:

    UpColor (Green),

    DnColor (red),

    UnCngColor (black);

     

    Variables:

    BarColor (0);

     

    If Close > Close[1] then BarColor = UpColor

    else

    If Close < Close[1] then BarColor = DnColor

    else

    BarColor = UnCngColor;

     

    Plot1(BarColor);

    [code]

     

    But it plots like a line and doesnt change the colour of the bar.

     

    TAMS, I enjoy the cryptic nature of your replys. There was a typo in my original post...you didnt spot it...too quick to react! lol.

     

    "It would be good if it updated intrabar as the black changing to green or RED would be a great alert to a move away from value"


  8. I'm trying to build an EL code for colour bars. Losely based on Jerry's Shapiro effect entry stlye.

     

    The basic idea is

     

    if Current Bar H > last bar High then colour green

    if Current bar L < last bar low then colour red

    If CB H>LB H and CB L< LB L then colour black.

     

    It would be good if it updated intrabar as the black changing to green or black would be a great alert to a move away from value.

     

     

    Thanks

     

    VT


  9. Not sure it worked.

     

     

     

    I think the key point to ask is did it 'work' for you?

     

    If after testing it (OEC market replay give you the opportuntiy to try it out on multiple contracts) your results are positive, and you develop faith and a good feel for it then it 'works'.

     

    Everyone processes the data we recieve on the charts differently, we are all dealing with approximations to a greater or lesser degree (with reference to volume).

     

    Maybe use it as part of the jigsaw,and not the whole picture.

     

    VT


  10. Good advice. How much do you pay for the news feed?

     

     

     

    The price is dependent on which package you go for…Equities, Forex, commodities etc.

     

    Don’t misunderstand me though; the purpose of the post wasn’t to sell a live news feed.

     

    It was more of a cautionary note about the perils of listening to teenage scribblers on networking sites, and the ‘expert’ opinions and clichés of arm chair analysts on CN-BS or BULLBURG.

     

    A live news feed has limited merit for a newcomer in my opinion; it always takes a few minutes for the market to digest the data before direction (if any) is established. As the news hit the trading floor (or the Algo’s server) the market becomes a chop zone.

     

    In my early days I remember a guy on the trading floor who’d place stops at either end of his perceived range and wait for the market to hit them at data release time. For while he booked some profits, but he eventually gave it all back, and some more for good measure.

     

    Sometimes it’s easy to overlook the real fundamentals, that the market is a dual auction process, if someone’s buying then someone is selling.

     

    Some Squawk providers offer a free ‘retail’ version of their live news with a few minutes delay.

     

    I’d keep money you’re willing to spend on a live squawk in your trading account for now, as it will be of greater use to you if you have a period of drawdown.

     

    Don’t sweat the opportunities you feel may have missed at data release time, we are all ‘The World’s Best Trader’ when it comes to looking back at our charts at missed entry and exits.

     

    Good Luck

     

    VT


  11.  

    Where would you put that additional code in the formula to get a continuous VWAP/SDs for perhaps the past 2-3 days?

     

    Regards,

    Halli.

     

    In the original code

    If date > date[1] 
    

     

    With Any Average, the longer the sample rate, the less sensitive it will be. Altering the VWAP for longer term analysis is great for just that. Dont expect to see many daytrading entry signals from it. The market sentiment / perception of value can change from one day to the next ( Compare Equities on the 18th & 19th this week as an example). Good Luck with it Halli.

     

    VT


  12. Further to my PVP Problems, I tried out the another code from the TL site..

    vars:         MyVolume(0),
    	PriceDiff(0),
    	StartPrice(0),
    	PVPPrice(0),
    	PVPVolume(0),
    	V2VolLevel(0);	
    
    Array:
    	PVPVolArray[10000] (0);
    
    MyVolume = Volume;
    
    if date > date[1] then begin
    	StartPrice = AvgPrice;
    	For Value1 = 0 to 10000 Begin
    		PVPVolArray[Value1] = 0;
    	End;
    	PVPVolArray[5000] = MyVolume;
    	PVPPrice = AvgPrice;
    	PVPVolume = MyVolume;
    end;
    
    If date = date[1] And StartPrice > 0 Then Begin
    	Value2 = AvgPrice - StartPrice;
    	V2VolLevel = 5000+(Value2*(1/(minmove/pricescale)));
    	PVPVolArray[V2VolLevel] = PVPVolArray[V2VolLevel] + MyVolume;
    
    	If PVPVolArray[V2VolLevel] > PVPVolume Then Begin
    		PVPVolume = PVPVolArray[V2VolLevel];
    		PriceDiff = 5000-V2VolLevel;
    		PVPPrice = StartPrice - (PriceDiff*(minmove/pricescale));
    	End;
    
    End;
    
    Plot1(PVPPrice, "PVP");
    Plot2(PVPVolume, "PVPVolume"); 

     

    I've turned off the tick-by tick update option, else the pvp line seems to follow the last price.

     

    My question is, is this reliable? The reason i question it is that my volume histogram shows the price with the most volume traded at different level. Am i missing somthing here? i've Demo traded using it before running it live, and some signals using the code seem to be correct, then at other times it appears my histogram peak volume is the correct one!


  13. I feel compelled to post and warn others, particularly newbies, about the information used for trading the news / fundamental trades.

    Before I continue, I’d like to point out that data providers in my post will remain nameless.

     

    My paid for news feed:

    Goldman Sachs EPS $3.79 vs. Exp $3.79

    Q4 Earnings $8.46 bln vs. Exp $8.86bln

     

    Free ‘Market Update’ Via Twitter

    ‘Goldman’s’ post $2.4 bln profit!’

     

    Based on the information and ‘Spin’ one could have seen a potential long trade following the ‘Tweet’.

     

    Clearly it’s always best to stay out on new releases, but even with a 2 or 5min ‘settling time’ you could have given the market (and indeed Goldman’s) quite a few dollars in a very short time.


  14. Thanks for the expediant reply Tams.

     

    I see what you mean, I've checked back and all POPSTOCKS PVP codes, and other TL users veriants use it, but what it does i have no idea.

     

    I'm learning EL as i go, and my only programing knowledge is BASIC from when i was a kid (20 years ago). I looks like a loop of some kind.

     

    I've removed the line you hightlighted,

     

    the PVP line follows the current price bar, and is not giving the correct signal.

     

    I have a volume histogram on OEC, but this is set to the day volume and is not user adjustable (from OEC tech support)

     

    So the VOL@price histogram give a rough PVP, but isnt session accurate a volume traded befor the cash open is also diplayed. Besides i find it distracting having to keep update a PVP line manually on my chart.

     

    Thanks VT


  15. I tried to add the PVP code (OEC EL) that POPSTOCKS kindly posted on TL, however it failed to compile.

     

    I tinkered with the 'Counters' as this was where the error message was pointing to.

     

    I can now get it to run, but it appears to be giving me the PVP of each bar.

     

    When i compare it to my Volume @ price histogram it returns a differnet value.

     

    Is this because it is giving me the Peak volume Price from when the indicator is added / enabled, and is only of use in real-time?

     

    Any help would be greatly appreciated.

     

    Vars: Counter(0),
    Op(0), 
    Ct(0), 
    hh(0), 
    f(0),
    mintick(0);
    
    Array: v[800](0), p[800](0);
    
    mintick=minmove/pricescale;
    
    If 1 = 1 then Ct =1+Ct;
    If Date > Date[1] or Ct = 1 then begin
    Op = Open-100;
    
    For Counter = 1 to 800
    begin
    p[counter] = 0;
    v[counter] = 0;
    End;
    
    End;
    
    For Counter = 1 to 800
    begin
    p[counter] = (counter*mintick)+Op;
    
    If Close = p[counter] then v[counter]= volume+v[counter];
    
    End;
    
    hh = highestarray(v,800);
    
    if hh> hh[1] then f = close;
    
    Plot1(f);


  16. Hi,

     

    I saw your EL code for the VWAP/SDs and imported it to OEC. Is this study similar to Jerry´s study, found under the Trading with Market Statistics threads here at TL.com?

     

    Is it for tick-by-tick or 2m? At what time do you start the study?

     

    I am using Jerry´s study in Ensign and want to compare it to yours.

     

    Regards,

    Halli.

     

    I use it on a 5min as i find 2 min far too noisy for my requirements.

     

    I do not use it in the same way as Jerry (although his posts and videos are excellent) For me it is an extra tool in an holostic approach to trading and market structure.

     

    The study will start at the same time as your default market start times on the OEC platform.

     

    By posting this code i am in no way reccomending its use in any particular way.

    best to paper trade it first to suit your own style.

     

    Best of Luck

     

    VT


  17. why don't you just post the code.

    this is a mutual community, that's why you came here in the first place.

    (unless you are fishing for contact names)

     

    Not sure if you're being rude in a friendly way, or friendly in a rude way.

     

    I'll post the code and look forward the remarks that make coming these forums such a fun and rewarding experiance.

     

    vars: vwap(0),
    pv(0),
    Totalvolume(0),
    Barfromstart(0),
    Squareddeviations(0),
    Probabilityweighteddeviations(0),
    deviationsum(0),
    standarddeviation(0);
    If date > date[1] 
    then 
    begin
    Barfromstart=0;
    pv=AvgPrice*volume;
    Totalvolume=volume;
    vwap=pv/totalvolume;
    end
    else
    begin
    Barfromstart=Barfromstart[1]+1;
    pv=pv[1] + AvgPrice*Volume;
    Totalvolume=Totalvolume[1] + Volume;
    vwap=pv/Totalvolume;
    end;
    deviationsum=0;
    for value1= 0 to Barfromstart
    begin
    Squareddeviations=Square( vwap-avgprice[value1]);
    Probabilityweighteddeviations=volume[value1]*Squareddeviations/Totalvolume;
    deviationsum=deviationsum +Probabilityweighteddeviations;
    end;
    
    standarddeviation=SquareRoot(deviationsum); 
    Plot1(vwap);
    Plot2(vwap+standarddeviation);
    Plot3(vwap+2*standarddeviation);
    Plot4(vwap-standarddeviation);
    Plot5(vwap-2*standarddeviation);

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.