Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,631 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Altering a TRADE struct's entry price #486075
06/07/22 19:02
06/07/22 19:02
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Never worked with structs before, and neither with C for that matter, so I'm not sure how to proceed. I want to modify the entry price of a trade that is entered with enterLong() for instance. Is this possible?

I tried the following:

TRADE* T = enterLong();
T->fEntryPrice = myentry;

but the script crashes the first time these lines are executed.

I also realised that Fill=8 mode exists which is probably a better alternative for what I'm trying to do but I'm almost there with my current approach...

Re: Altering a TRADE struct's entry price [Re: MegaTanker] #486076
06/07/22 19:15
06/07/22 19:15
Joined: Apr 2008
Posts: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
Austria
The script crashes of course when T is 0. You must always check that.

Re: Altering a TRADE struct's entry price [Re: MegaTanker] #486077
06/07/22 19:39
06/07/22 19:39
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Ah yes, always returns 0 during lookback crazy


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1