Hi falks,
i need some help please.
I am trying to build a strategy using parabolic sar ( don’t lought I know it’s hard ) but I am encountering a problem. I am not able to make the system recognize the last position. For example if the system goes long and the position enter long how can I tell the system to do not enter any other order short until the current position its been close either in stop or at target ?
Thank you in advance to anyone it will halp me
Andrea
Help please
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Help please
Hello Andrea71,
MarketPosition returns a numerical value, indicating the type of the specified position (open position, one/two positions back, etc.).
A value of 1 indicates a long position, -1 indicates a short position, and 0 is returned only if the current position is specified and indicates that the current position is flat.
MarketPosition returns a numerical value, indicating the type of the specified position (open position, one/two positions back, etc.).
A value of 1 indicates a long position, -1 indicates a short position, and 0 is returned only if the current position is specified and indicates that the current position is flat.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Help please
hi Henry, unfortunately not
in the backtest it still missing trades that he should have done without problems like many others that are oki and the missed are many any suggestions ?
thank you in advance
andrea
in the backtest it still missing trades that he should have done without problems like many others that are oki and the missed are many any suggestions ?
thank you in advance
andrea
- Attachments
-
- trades.jpg
- (112.94 KiB) Downloaded 321 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Help please
Hello Andrea,hi Henry, unfortunately not
in the backtest it still missing trades that he should have done without problems like many others that are oki and the missed are many any suggestions ?
thank you in advance
andrea
I would recommed you to check this article and use Print statement to debug your code.