Announcement

Collapse
No announcement yet.

Help With fgallfalse2b.efs, Please?

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

  • Help With fgallfalse2b.efs, Please?

    Hi Alex,
    I found this great study you did for buy & sell signals. I'm wondering if it can be applied to your Trading the trend2 study that I use with my T3 channels? It looks pretty complicated so I thought I'd better ask you about it. Thanks.
    Diane
    Last edited by Diane P; 08-27-2005, 05:12 PM.

  • #2
    Diane
    Actually all I did in that efs was add an alternate strategy and the back testing logic.
    Anyhow the core of the strategy is relatively straightforward as it is the sum of the signals generated by the conditions of three studies specifically CCI, RSI and Stochastic. The studies are defined in lines 90-92 while the logic to generate the signals and process them are in lines 126-131 and 135-136 respectively. The rest of the script is primarily for calculating the profit/loss of the strategy and displaying it both on a trade by trade basis and as a cumulative total.
    If you run a search for fgallfalse* you should find the thread that relates to the efs.
    Alex

    Comment


    • #3
      Good Morning, Alex,
      Thanks for your explanation of your study. I have a lot of free time today, so I'll work on it. It will be a great visual enhancement to my chart. I did receive your message. Thank you so much for all your help. Have a great day!
      Diane

      Comment


      • #4
        Hi Alex,
        Well, after an hour, I don't seem to be getting anywhere. Could it be I'm dealing with apples & oranges? Your fgallfalse study deals with CCI, etc., as you mentioned. However, Tradingwiththe trend deals with Donchian. I'm trying to plot the sell signal bar, with price , at the hilimit, & the buy signal bar, with price, at the lolimit. Could you please give me a little more guidance? Thanks.
        Diane

        Comment


        • #5
          Diane,

          You can use fgallfalse as a template on how to combine different studies into a trading strategy. The intent was never to have a good trading strategy with it, instead it was all about showing a generic example of one method for combining studies and presenting results.

          So, if you want a template to combine different studies and display results this is a fairly good one. In theory you could make this a "one study" systems as well. You should be able to substitute Donchian channels for Stoch's, change the logic a bit to apply to Donchian and then rip out the other two entirely.

          I'm not sure if this gives you the reults you are after...and even if it does it may not be the easiest way to do this. If all you want is some alerts when your signals are hit, then it would be far easier to copy alert code from some study and add them to your existing study.

          More details on the exact results you are after would be helpful.

          Regards,

          Garth
          Garth

          Comment


          • #6
            Hi Garth,
            Thank you for your help. What you are suggesting is exactly what I want to do. I'll work on the Donchian in place of the Stoch & drop the other two. I'm just not sure which part of the study tells me what to input in order to build the bar to depict high & low on the Tradingthe trend study. You're obviously familiar with Alex's fgallfalse study. The study plots the bar ,with price, at the various crossovers for CCI,RSI, STOCH either as a buy signal or as a sell signal. I would like to take the Tradingthetrend study, fill in the blanks,so to speak, & plot the bar when the high has been reached, for a sell signal, & plot the bar when the low has been reached for a buy signal. I'm sure I'm biting off more than I can chew for my very limited experience, but Alex's studies help me a lot. Thank you, again, for taking an interest in my problem.
            Diane

            Comment


            • #7
              Diane
              Actually the fgallfalse study does not plot anything. It paints the background in green or red when a buy/sell signal is generated and writes the entry price (which is the Close of the bar that triggers the signal), the profit/loss for the trade that just closed and that of the running total.
              As to the Tradingthetrend study the Donchian is used internally to retrieve the highest/lowest value of the Close over the defined period. That value is then used together with the weighted moving average of the true range to compute the hiLimit and loLimit variables. These are used in turn to define ret which is the signal line that prices need to close above/below to trigger a signal. The entry price is theoretically the Open of the first bar that changes color.
              So if all you want to do is write the entry price on the chart and paint the background of the bar that triggers the signal then create a global variable called for example FirstTime and set it to -1. Then add the required logic in the conditions if(Close > ret) or if(Close < ret). See the example below. As an aside this is similar to the logic used to create a unique condition that I suggested to you for vFlag in this thread.
              Alex

              PHP Code:
              if(Close ret){
                      
              setPriceBarColor(Color.blue);
                      if(
              FirstTime!=1drawTextRelative(00formatPriceNumber(open(0)), Color.bluenullText.RELATIVETOTOP|Text.CENTER"Arial"10);
                      if(
              FirstTime!=1setBarBgColor(Color.yellow)
                      
              FirstTime=1;
                  }
                  if(
              Close ret){ 
                      
              setPriceBarColor(Color.red); 
                      
              //if(FirstTime!=2) add here the drawTextRelative command with parameters
                      //if(FirstTime!=2) etc etc 
                      
              FirstTime=2
                  

              Comment


              • #8
                Good Morning Alex,
                Thank you so very much for taking the time to explain to me how Donchian & fgallfalse work. I can see the logic is the same as what we did before. Gosh, that was so simple! I was making it so much more difficult on myself. Having done this a couple of times now, next time I shouldn't have any trouble. Thank you, again, for your time & patience. Those of us struggling along & trying to learn would be totally lost without you!
                Diane

                Comment


                • #9
                  Diane
                  My pleasure
                  Alex

                  Comment

                  Working...
                  X