Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Cases like this first step is always to put a 'Print ("CB " + CurrentBar + " SLL " + stop_loss_level);' type of statement in and check the output window - what does that show?
Cases like this first step is always to put a 'Print ("CB " + CurrentBar + " SLL " + stop_loss_level);' type of statement in and check the output window - what does that show?
Sorry Ratfink, what should it happen? I putted your code row in my script but nothing change on the chart
I declared stop_loss_level in the #region Variables as: double stop_loss_level = 0
public class ComplexYMpeak2 : Strategy
{
#region Variables
double stop_loss_level = 0
#endregion
Could it be the matter?
We assumed you were calculating the stop_loss_level from somewhere else it is a persistent variable, if not that will definitely be your problem which is why Prints to the output window are always first port of call to check for valid/invalid assumptions, etc.
We assumed you were calculating the stop_loss_level from somewhere else it is a persistent variable, if not that will definitely be your problem which is why Prints to the output window are always first port of call to check for valid/invalid assumptions, etc.
I really don't have any preparation about variables anyway my stop_loss_level is:
Looks like you just need to work back with Prints at every stage to prove that average price and stop loss are themselves containing some useful numbers, then you can think more about the drawtext call.
Looks like you just need to work back with Prints at every stage to prove that average price and stop loss are themselves containing some useful numbers, then you can think more about the drawtext call.
Just done it!
The output windows gives me all the values correctly in some current bars (the ones related to the opened position, of course). Infact the strategy works as it due but the row