Updating pending trades with MaxLong/MaxShort

Posted By: MegaTanker

Updating pending trades with MaxLong/MaxShort - 11/07/21 17:17

enterLong/enterShort calls are supposed to update pending trades when the limit of MaxLong/MaxShort (both = 1 in my script) is reached but it doesn't seem to work for me unless EntryTime is at the default of 1. But in that case, entries are missed after one bar and the following enter call doesn't really update the existing trade, it rather replaces the trade that just expired, so it only looks as though it is updating the trade. When I set EntryTime to something higher so that the trade is actually still alive upon the next enter call, the trade is not updated. I checked using the STEPWISE feature where the pending trade is shown in a window. I am printing the Entry value before the enter call with a watch statement to confirm that this is indeed changing as desired, but the following enter call doesn't change the pending trade's Entry to the new Entry even though it is different. (Same for the take profit)

Am I missing something?
Posted By: Spirit

Re: Updating pending trades with MaxLong/MaxShort - 11/07/21 17:26

MaxLong,Short updates pending trades? I think not.
Posted By: MegaTanker

Re: Updating pending trades with MaxLong/MaxShort - 11/07/21 17:33

Yeah now I see the manual only mentions open trades so that explains it
© 2024 lite-C Forums