I have been trying to figure out which option is best for what I am trying to accomplish before I spend a lot of time trying to get it done on my own. I am trying to enter extra contracts on a pullback while I am still in a trade that direction. How I have it coded, I can use trade 1, trade 2, trade 3 which will be based off trade 1's entry signal.
Option 1: Use Limit Orders
I can have Trade 1 enter right as my conditions are true.
Now I could place limit orders with an offset wherever I want for trade 2
Then even further for trade 3.
I have been trying to work on limit orders for awhile and have had to use live until cancelled true for now since I have struggled with getting orders cancelled and then allow rentry after cancelled. I know this has to do with on orderupdate but I just haven't had the time to fix it since my strategy still works well on other parameters without it. For this new system I am working on it takes more trades so it would be bigger task and good for me to figure out longer term.
Option 2: Trigger States/EntryFlag/Bools (If that is the right terminology)
For this I figured I can have all the on bar update logic nested and then when it becomes true enter trade 1.
Then for trade 2 I was thinking have my entry flag or whatever I choose be true, then when the (close[0]<= Positions[0].AveragePrice - trade2offset*Ticksize) becomes true it will activate trade 2 and then repeat with a similar logic for trade 3.
Coding wise will one be easier to accomplish? I have been learning a lot of coding over the last 2 years just by trial and error and have had systems running live without any issues after extensive market replay and live testing. Essentially just want to know which option could be better
Comment