people with nt, fellow nt users,
i want to develop a green to red strategy i have had in mind for a while and i will appreciate both the assistance of nt's staff and also any assistance from other nt users.
the general structure would be very simple, if price is made to open at a higher level than that of the close of the previous session then declare a green condition to be true, if price is being sold lower, open a short position and set stop loss and profit target orders. and that would be it.
the difficulty for me results from knowing which kind of inputs - variables to use in nt - c# and how to best make them work from one trading session to the other as necessary. i have a list of very specific questions, so it will be impossible for nt support to resort to their usual position of - we won't code for you -. if any other users have any advice, that will be quite welcome.
- first question, for the "close" value, i want to use something like the value for the highest high between 15:30 and 16:00 for the previous trading session. also, there must be some way to avoid the problems caused by shortened sessions, sessions closed due to holidays or weekends for which this highest high value does not exist. so, ¿what would be the best way to store - hold the value for the highest high between 15:30 and 16:00 for the nearest previous session for which this value exists and have it available for the next occasion in which it could be used?
- second question, for the "open" value, i am considering the highest high between 09:30 and 10:00 for the current session. same as before, ¿which would be the best format and type of variable to have this value available when applicable?
if "open" is at least .5% higher than "close", then i would declare the green condition to be true. i think a boolean variable should work perfectly for this purpose.
- then, if green is true and a bar is made to close below the arithmetic halfway point between "open" and "close" then i would declare the to red condition to be true, green to now be reset to false and open a short position with a stop above the high of the day and a profit target below the value for "close". ¿which would be the best formats and types of variable to have these values available to be used to open a position and set a stop loss - profit target bracket?
- it seems to me that most of these variables could need to be reset after the end of each trading session. ¿how could this be accomplished?
- and lastly for the moment, if i wanted to evaluate whether a green to red pattern has any lasting effects, ¿how could i create a variable that would be true for the next three following trading sessions only if the pattern is observed and price is sold lower than the value for "close" at some point? there must be very elegant ways to create and process a variable to serve such a purpose.
this is it for the moment, hopefully this should be an easy strategy to develop and should generate interesting results.
very well, thanks, regards.

Comment