The issue of copying actual studies has been covered a few times from memory 
Sid but I don't know where it stands.
I created a script for it because I got so sick of not only copying study lines 
but re-copying them whenever you change one.

The following is a simple display of what I was referring to in my last post.
Add this to any existing script that has a price plot.
Create a text file called levels.txt with a different level value on each line 
and put it in the root Amibroker folder.
This code just loads that data into static vars when you click the Load button, 
then displays them.

I use a similar one and find it the fastest way to display horizontal levels 
across multiple charts. It has the natural advantage that you only have to 
change a value once in the text file to have it updated across all charts.


showLevels = ParamToggle("Show Levels", "No|Yes");
filename = ParamStr("Filename", "levels.txt");
LoadTrigger = ParamTrigger("Load Levels", "Load Levels");

VarPrefix = "levels";

procedure loadLevels (){
        fh = fopen(filename, "r");
        if(fh) {
                StaticVarRemove(VarPrefix + "*");
                LevelCount = 0;

                while(!feof(fh)){
                        Line = fgets(fh);
                        LevelCount++;
                        LevelValue = StrToNum(Line);
                        StaticVarSet(VarPrefix + LevelCount, LevelValue);
                }

                StaticVarSet(VarPrefix + "levelcount", LevelCount);     
                fclose(fh);
        }
}


procedure displayLevels(){
        LevelCount = StaticVarGet(VarPrefix + "levelcount");
        if (!IsEmpty(LevelCount)){
                for (i=1; i<=LevelCount; i++){
                        LevelValue = StaticVarGet(VarPrefix + i);
                        if (!IsEmpty(LevelValue)){
                                Plot(LevelValue, "", colorBlack, styleLine);
                        }
                }
        }
}

if(LoadTrigger){
        LoadLevels();
}

if (showLevels){
        displayLevels();
}


The levels.txt file would look something like this
4000
4005
4020
4035
etc

Regards,
Jules.


--- In [email protected], "Rob" <sidharth...@...> wrote:
>
> Ummm... it's a tricky one. I'm not particularly keen to reinvent the wheel 
> and create my own study plotting interface...
> 
> Before I go down that road I just want to check I'm not missing a more 
> obvious way of replicating studies across charts of different symbols... i.e. 
> highly correlated symbols where the price action is similar enough that they 
> broadly have similar characteristics... for example, reaction highs and lows 
> in roughly the same places... etc
> 
> 
> --- In [email protected], "jooleanlogic" <jooleanl@> wrote:
> >
> > I just manually write levels in a text file Rob and then have a simple 
> > script to load and plot them which you can add to any chart.
> > 
> > You can also prefix different types of levels. E.g.
> > vah,4000
> > poc,3990
> > val,3985
> > vah,3970
> > ...
> > and plot them in different colours or turn different types off/on.
> > 
> > Regards,
> > Jules.
> > 
> > --- In [email protected], "Rob" <sidhartha70@> wrote:
> > >
> > > Can anyone think of a good way of 'replicating' studies across charts and 
> > > symbols...
> > > 
> > > For example, thinking of something very simple... lets pretend I wanted 
> > > to draw a horizontal line across a reaction low in the ES contract... 
> > > would there be an easy way of replicating that study in the NQ contract 
> > > (i.e. across that same reaction low but in a different contract).
> > > 
> > > I need to do something similar across multiple contracts, multiple 
> > > times... so a way of automating the replication would be very useful.
> > > 
> > > Suggestions appreciated...
> > > 
> > > TIA
> > >
> >
>


Reply via email to