Announcement

Collapse
No announcement yet.

Overlapping studies?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Overlapping studies?

    In esignal if you hold shift and then drag one study over the other they will merge together. My question is it possible to create a back test of this even though the 2 different studies are on different scales(ex would be cci crossover on stochastic or rsi)?

  • #2
    fflaque
    You would need to code both indicators in the same efs to back test the strategy.
    Alex

    Comment


    • #3
      k thanks

      Comment


      • #4
        Hi fflaque,

        To add to Alex's post. The Backtester is designed to generate profit/loss results to the Strategy Analyzer. The combined EFS of the CCI and Stochastic/RSI would also need to have clear-cut instructions about potential buy and sell commands to generate a comprehensive backtesting result. You may also want to visit the EFS Help Center & Library. The Backtesting Help folder may better explain what is needed to properly code a backtesting EFS. Hope this helps.

        Comment


        • #5
          thanks guys for the help, i just came across a problem....when i merge the studies on the chart there is no scaling problem, the indicators stay the same, but when i code them together, one of the indicators is on a much higher scale than the others, how do i go about changing the scaling(like say having one of the indicators doubled or change exponentially?)

          Comment


          • #6
            actually changing the scaling isn't the problem is actually having two different scales....is this possible?

            Comment


            • #7
              see here is an example of what i'm talking about, when you mix the two together the scaling is way off of course but they keep the same scaling when you merge them together, i'm just trying to figure out how to code the seperate scaling so then i can backtest it.
              Attached Files

              Comment


              • #8
                Fflaque,

                Looking at your EFS study, I see where the scaling is an issue. If you are going to running the Strategy Analyzer, the scaling will not affect the outcome of the backtester. The scaling is purely for visual purposes. I've included two screenshots. One is with the CCI and RSI overlaid on top of one another with the scaling set to "Right". The second is a chart with your EFS applied. As you can see, the visual result is the same.





                Basically, if you are looking to map crossover points of the two indicators, then the overlaying of the two indicators should work for you. If you want to backtest the signals generated from crossover points through the Strategy Analyzer, then your EFS should work for you as the scaling issue is strictly visual and won't affect the results. Hope this helps.

                Comment


                • #9
                  i wrote out the code to backtest the strategy and it treated it if they were both on the same scale, am i doing something wrong?

                  Comment


                  • #10
                    Overlapping Studies (Price Bars and custom study)

                    I am having a similar problem by coding a custom study and based on changes in that study, painting colored price bars creates an issue. The colored bars are on the same scale as the study and becomes very small as the indicator/study sets the scale and takes up the whole screen. Any recommendations? I scripted one EFS that contains the study and based on the values of the study the EFS changes colors on price bars.

                    If I do not print the price bar colors the Study shows up under the volume indicator, if I print the colors the study is on top of the price bars. How can I position where I want to draw the study?

                    Comment


                    • #11
                      jdgarte

                      How can I position where I want to draw the study?

                      You do that with the setPriceStudy() statement in preMain().
                      If you want the study to plot in the price pane you use setPriceStudy(true) otherwise use setPriceStudy(false).
                      Note that an efs cannot plot at the same time to both price pane and indicator pane. However if it is set up as a non price study it can paint the price bars.
                      Alex

                      Comment


                      • #12
                        Plotting 2 studies

                        SO can I call one EFS in another EFS. I want to script an indicator and also have it paint bars in another script. I understand that it is conflicting to say setPriceStudy to true and false. Therefore, can I call another script within my indicator script to paint on the price bars?

                        Comment


                        • #13
                          jdgarte
                          Not sure I understand what you are trying to do.
                          Irrespective, even though an efs cannot plot at the same time in both panes (price AND indicator) it can plot in an indicator window AND paint the price bars.
                          Alex

                          Comment


                          • #14
                            I want to create an indicator that will have a few diffferent indicator(cci, rsi and a momentum oscillator, for example) in a back testable format(all coded togeather) that still display on their their original scale. I was going to set it up with diffferent multipliers, so they are displayed on similar scales. Is there a better way to do this?

                            Thanks,
                            Chris

                            Comment


                            • #15
                              For anyone that was intrested, that multiplier worked. Using CCI and a price oscillator. The edit was from:
                              vPriceOsc5_35.getValue(OscStudy.OSC)
                              (vPriceOsc5_35.getValue(OscStudy.OSC)*500)
                              Attached Files

                              Comment

                              Working...
                              X