NexusFi: Find Your Edge


Home Menu

 





Strategy is sending orders but they’re canceled immediately, why? No broker side prob


Discussion in MultiCharts

Updated
    1. trending_up 5,885 views
    2. thumb_up 13 thanks given
    3. group 4 followers
    1. forum 26 posts
    2. attach_file 6 attachments




 
Search this Thread

Strategy is sending orders but they’re canceled immediately, why? No broker side prob

  #21 (permalink)
Dvdkite
Trieste Italy
 
Posts: 162 since Feb 2018
Thanks Given: 131
Thanks Received: 25


ABCTG View Post
David,

is using High for Price really a fix and more important doing what you want your code to do or will this just reduce the cancellations while still allowing orders getting cancelled? From the code snippet you will probably still have situations where an order gets triggered and cancelled on the next tick (or before getting filled) as the high moves higher. The order would then not get re-issued again for that bar as the bar's high can only move higher.
If you want the order to remain uncancelled a flag would be the way to go.
 
Code
Price >= oYesterdaysTPOVALow and Price - oYesterdaysTPOVALow <= 10
Regards,

ABCTG

Hello ABCTG,

thanks for you answer. The good things about forums (expecially FIO :-D) it that other experts made you think twice about your idea.
So I went back to check if the simple "HIGH" modifications should be the solution.
I took again a screenshot of the trade that we were talking at the beginning of this thread and then I made a a blue rectangle to show you what should be the area where the order needs to be filled.




So The level below the rectangle is a oYesterdaysTPOVALow and just after it cross the level (just leave on the side the other conditions related to the previous bars) the system should place a SHORT order at oYesterdaysTPOVALow + 3 limit so if I'm not wrong there's a 7 points room to execute that order from oYesterdaysTPOVALow + 3 and oYesterdaysTPOVALow + 10 () .

So by using this code(please correct me if I'm wrong):

 
Code
H >= oYesterdaysTPOVALow and Price - oYesterdaysTPOVALow <= 10

the system should take the order alive inside the BLUE rectangle starting from 3 points over oYesterdaysTPOVALow till the top and NOT OVER (and that 's what I want, I don't want a short higher as it could probably turn in a SL based on my strategy). So H can be even Higher but I want that the short order is placed WITHING 10 points from the oYesterdaysTPOVALow and not more, so as soon and the price drop BELOW oYesterdaysTPOVALow <= 10 the order will be placed alive.

I think that the 7 points room is enought to trigger the short order. Don't you think?

Thanks as always and Regards,

David

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #22 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

David,

it might not always be 7 points, though and you might want to consider the situations and think about how you want this dealt with if the High - oYesterdaysTPOVALow is equal (or in close proximity) to 10.
There is probably not a right or wrong answer here and the best solution (for you) will be the one that does what you want the code to do.

Regards,

ABCTG




Dvdkite View Post
Hello ABCTG,

thanks for you answer. The good things about forums (expecially FIO :-D) it that other experts made you think twice about your idea.
So I went back to check if the simple "HIGH" modifications should be the solution.
I took again a screenshot of the trade that we were talking at the beginning of this thread and then I made a a blue rectangle to show you what should be the area where the order needs to be filled.




So The level below the rectangle is a oYesterdaysTPOVALow and just after it cross the level (just leave on the side the other conditions related to the previous bars) the system should place a SHORT order at oYesterdaysTPOVALow + 3 limit so if I'm not wrong there's a 7 points room to execute that order from oYesterdaysTPOVALow + 3 and oYesterdaysTPOVALow + 10 () .

So by using this code(please correct me if I'm wrong):

 
Code
H >= oYesterdaysTPOVALow and Price - oYesterdaysTPOVALow <= 10

the system should take the order alive inside the BLUE rectangle starting from 3 points over oYesterdaysTPOVALow till the top and NOT OVER (and that 's what I want, I don't want a short higher as it could probably turn in a SL based on my strategy). So H can be even Higher but I want that the short order is placed WITHING 10 points from the oYesterdaysTPOVALow and not more, so as soon and the price drop BELOW oYesterdaysTPOVALow <= 10 the order will be placed alive.

I think that the 7 points room is enought to trigger the short order. Don't you think?

Thanks as always and Regards,

David


Follow me on Twitter Reply With Quote
Thanked by:
  #23 (permalink)
Dvdkite
Trieste Italy
 
Posts: 162 since Feb 2018
Thanks Given: 131
Thanks Received: 25



ABCTG View Post
David,

it might not always be 7 points, though and you might want to consider the situations and think about how you want this dealt with if the High - oYesterdaysTPOVALow is equal (or in close proximity) to 10.
There is probably not a right or wrong answer here and the best solution (for you) will be the one that does what you want the code to do.

Regards,

ABCTG

Hello ABCTG,

if the order is in proximity of Price - oYesterdaysTPOVALow = 10 then it is going to be the maximum price accepted for the short as the short at oYesterdaysTPOVALow + 3 limit order will be immediately executed at oYesterdaysTPOVALow + 10 (or 9 whatever) at a better condition than required.

Anyway as you said there is probably not a right or wrong answer here but the important thing is that the code does what I want and then I think that the real test will give us an aswer :-D

Regards,

David

Reply With Quote
  #24 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

David,

I agree, your testing should show this. What I had in mind is that this could trigger an order cancellation when the High on the next tick is one tick higher - but you might be already filled then of course - if not, your code would not be able to re-issue an order for that bar, though, as this particular entry condition can't become true anymore.

Regards,

ABCTG


Dvdkite View Post
Hello ABCTG,

if the order is in proximity of Price - oYesterdaysTPOVALow = 10 then it is going to be the maximum price accepted for the short as the short at oYesterdaysTPOVALow + 3 limit order will be immediately executed at oYesterdaysTPOVALow + 10 (or 9 whatever) at a better condition than required.

Anyway as you said there is probably not a right or wrong answer here but the important thing is that the code does what I want and then I think that the real test will give us an aswer :-D

Regards,

David


Follow me on Twitter Reply With Quote
Thanked by:
  #25 (permalink)
Dvdkite
Trieste Italy
 
Posts: 162 since Feb 2018
Thanks Given: 131
Thanks Received: 25


ABCTG View Post
David,

the Paper Trading Account will use its own symbol mapping, there shouldn't be any conflicts in two different accounts.

Regards,

ABCTG

Hello ABCTG,

just a few seconds ago I had another series of order rejected for "not enough margin". Because I settud up the paper broker with just 5050$ and it sais that the DAX require 34000$...( ok now I can simply put more money as starting point into the paper broker) I was just wondering where the paper broker took that value?? With CQG for example the intraday margin is 2500$ ... but I think the platform took it from the cqg broker..

Regards,

David

Reply With Quote
  #26 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

David,

what makes you think the margin was taken from CQG? As far as I am aware the margin should be taken from your Quotemanager settings for a symbol when you are using Paper Trader. If the margin value is not set or 0 MC will compute the margin if I correctly recall using the big point value and current price. Therefore either using the correct margin value in QM (or a value of 1) and/or raising your account value should work as a fix.

As a rule of thumb always check the symbol settings when you added a symbol as it's not guaranteed that the settings are correctly added.

Regards,

ABCTG


Dvdkite View Post
Hello ABCTG,

just a few seconds ago I had another series of order rejected for "not enough margin". Because I settud up the paper broker with just 5050$ and it sais that the DAX require 34000$...( ok now I can simply put more money as starting point into the paper broker) I was just wondering where the paper broker took that value?? With CQG for example the intraday margin is 2500$ ... but I think the platform took it from the cqg broker..

Regards,

David


Follow me on Twitter Reply With Quote
  #27 (permalink)
Dvdkite
Trieste Italy
 
Posts: 162 since Feb 2018
Thanks Given: 131
Thanks Received: 25


ABCTG View Post
David,

what makes you think the margin was taken from CQG? As far as I am aware the margin should be taken from your Quotemanager settings for a symbol when you are using Paper Trader. If the margin value is not set or 0 MC will compute the margin if I correctly recall using the big point value and current price. Therefore either using the correct margin value in QM (or a value of 1) and/or raising your account value should work as a fix.

As a rule of thumb always check the symbol settings when you added a symbol as it's not guaranteed that the settings are correctly added.

Regards,

ABCTG

Hello ABCTG,

No I didn't mean that it is taking from CQG the margin, because that's impossible (the paper broker use the IQFEED chart). I was just mentioning that CQG require 2500$ so I was wondering how much does require the Paper broker... it was just for comparison.
As we talked I didn't modified the Symbol setting for the PAPER TRADING(you said that paper trading broker has its own symbol settings)... because actually the symbol settings of #XG iq feed has the setting to buy/sell with CQG with real trading. It's impossible to import more than once the same symbol from Iqfeed so by using the paper broker I didn't take care of symbol mapping.

BTW: the symbol mapping of #XG iqfeed is actually like this (and it should work in real trading automation .....I hope):




Anyway I just raised my paper trading account and I'm waiting to see the first trade with the automated trading on

Regards,

David

Reply With Quote




Last Updated on May 2, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts