A technical question - page 2

 
I am uploading for the first time. It looks like upload did not happen. Let me try again.
 

I feel so stupid.  I did browse and put the name in the attach file box and then clicked add your comment. I do not see any button for upload.

but I do not see any link in my comment.

 
7325453863:

I feel so stupid.  I did browse and put the name in the attach file box and then clicked add your comment. I do not see any button for upload, but I do not see any link in my comment.

Don't "Attach" images. Use the image icon instead (on the toolbar):
 
May be this time.output of data window
 
7325453863:

I thought I will figure it out but no. I still need help. If you look at the attached picture, I have data window open and it shows four outputs from the indicator which are labeled as 1. forex lever 2. value2 3. value3 and 4. value4.

When I move cursor over the red arrow, value3 has a non zero value and value4 is zero. This I verified by moving cursor over all the red arrows. When I move cursor over the blue arrow, value3 is 0 and value4 has a nonzero value.

I thought value3 corresponded to buffer3 and value4 corresponded to buffer4. But that is not the case. So how do I read value3 and value4 from the indicator?

Since you mention, "Forex Lever" in your post, I did a Google search and found an indicator called "The Forex Lever", so I will assume that is what you have (see image below). These are the buffer details:

  1. Buffer 0, "The Forex Lever" represents the Upper Red Line
  2. Buffer 1, "Value 2"" represents the Lower Green Line
  3. Buffer 2, "Value 3" represents the Upper Red Arrow (pointing down)
  4. Buffer 3, "Value 4" represents the Lower Green Arrow (pointing up)


Files:
 

WARNING! After studying the indicator "The Forex Lever" in the Strategy Tester, I now realise that it is a REPAINTING indicator. The lines drawn are actually based on "future" data.

It is a "honey trap" made to catch unsuspecting Forex newbies and tricking them into thinking that it is a "holy grail" indicator. If you don't want to loose money, please DO NOT TRADE LIVE with this indicator.

 

Thanks for your reply.

Here is my code for getting this arrows. But for some reason it is missing a lots of arrows.  When I move the cursor on red arrow in the chart, value3 always has a nonzero value and value4 will be  zero.

When I move the cursor on a blue arrow, each and every time value4 will have a nonzero value and value3 has a zero.

How do I access value3 and value4 shown in the data window? If I can do that I am done.


void CheckEveryTick()
{   
     //Print("buffer1=",buffer1,", buffer2=",buffer2,", buffer3=",buffer3,", buffer4=",buffer4);
     if(bluearrow || redarrow) return;
    
     buffer2 = 0; buffer3 = 0;
    
     buffer3 = iCustom(symbol, 0, "The Forex Lever", SignalGap, ShowBars, 3, 0);
     if (buffer3!=0 && buffer3!=EMPTY_VALUE) bluearrow = true;
     if(bluearrow || redarrow) return;
    
    
     buffer2 = iCustom(symbol, 0, "The Forex Lever", SignalGap, ShowBars, 2, 0);
     if (buffer2!=0 && buffer2!=EMPTY_VALUE) redarrow = true;
 
     if(bluearrow || redarrow) return;

     return;
}


Do you see anything with my code ?

 

Please EDIT your post and use the "SRC" icon to place your code. Don't just copy/past in normal text mode. Use the "SRC" icon.

This indicator is NOT using the EMPTY_VALUE to define an empty value. It is using a zero value for that (namely "0.0000" in the my example).

  • Buffer 3 ONLY shows price values for the Red Arrow and when no arrow is present, its value is zero.
  • Buffer 4 ONLY shows price values for the Green/Blue Arrow and when no arrow is present, its value is zero.

So instead of testing for "0" or for "EMPTY_VALUE", just check for ">0" as a valid arrow price.

double SellArrowPrice, BuyArrowPrice;
bool   SellArrowFlag,  BuyArrowFlag;

void CheckEveryTick()
{   
   SellArrowPrice = iCustom(symbol, 0, "The Forex Lever", SignalGap, ShowBars, 2, 0); // Red  Arrow Price
   BuyArrowPrice  = iCustom(symbol, 0, "The Forex Lever", SignalGap, ShowBars, 3, 0); // Blue Arrow Price

   SellArrowFlag  = ( SellArrowPrice > 0 );  // Red  Arrow Flag
   BuyArrowFlag   = ( BuyArrowPrice  > 0 );  // Blue Arrow Flag

   return;
}

Also, please heed my previous warning and I quote:

WARNING! After studying the indicator "The Forex Lever" in the Strategy Tester, I now realise that it is a REPAINTING indicator. The lines drawn are actually based on "future" data.

It is a "honey trap" made to catch unsuspecting Forex newbies and tricking them into thinking that it is a "holy grail" indicator. If you don't want to loose money, please DO NOT TRADE LIVE with this indicator.

 

Thanks for the warning. But I already know about that. When you handle it right, it could give good results.

forex lever