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.

Эри&#108

Members
  • Content Count

    5
  • Joined

  • Last visited

Everything posted by Эри&#108

  1. You're absolutely right. I explained what I wanted to do incorrectly. What I meant to say in my first post was if indicator crosses below 80 then sell; if indicator crosses above -80 then buy sorry for the confusion. Since it was near midnight and I had been up for nearly 20 hours that might have had something to do with me incorrectly stating what I wanted to do. :doh:
  2. What I'm using is a simple oscillator (Inverse Fisher with some math added as well as weight to make it 'sticky'). I'm just checking if that oscillator crosses a value and plotting signals if it does. So I believe I'm just using event signals, correct? The program doesn't know if the oscillator has crossed the sell line previously. It only looks to see what is happening now. Thank you for taking the time to explain the difference though as I'm sure it will help me with more complex programs that rely on a trigger to initiate more triggers etc.
  3. Ok got it figured out. Thank you. Had a problem with it using negative values to plot so I just put in the math for the buy indicator and it worked. if SIH crosses below 0.88 then plot4(1, "Sell"); if SIH crosses above (0.88-1.76) then plot5(1-2, "Buy");
  4. Ok thank you very much, I figured out the structuring now but I'm getting an error while compiling. C# translation error: No overload for method 'SIH' takes '1' arguments. I'm guessing the trouble is with the custom indicator itself and not the new one I'm making it off of, would you think that to be the case? This is the code. Ideally I'll put in something like nextbar but for now I just want the basic part to get working. If I can. if SIH > 0.88 then if SIH < 0.88 then Plot4(1, "Sell");
  5. Ok so I know what I want to do, but I just don't know how to get the data to plot... I basically want to create an indicator based upon another indicators levels but I only want the new indicator to plot a value under certain conditions. Let's say I have a custom indicator (but let's use RSI as an example). I want this new indicator to first check if a certain level (let's say 80) has been crossed (to the upside) and then checks when that level is crossed again(to the downside). Once that level has been crossed again that's when I want it to set off a value of 1. I'd want to do this for the opposite side too, e.g. once 30 is crossed check if it's crossed again then plot -1, but I can figure out how to do that once I see the basic coding for checking just one way. I'm pretty sure I'd be using an 'if then' function with condition 1 but I'm not sure how to structure it, particularly the condition part... I know how to use the plot function so I really just need to see the structure of an if then for this case. Any help would be much appreciated.
×
×
  • Create New...

Important Information

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