Login Page - Create Account

Support Board


Date/Time: Fri, 07 Aug 2020 08:58:15 +0000



Compiler Error s_SCNewOrder

[2015-07-13 22:28:23]
enemyspy - Posts: 292 | Ending Date: 2020-06-14 [Expired]
Using the Code Below my compiler is giving me the following error: 'NewOrder' : undeclared identifier
All other functions in my code are not casuing problems the defintion for s_SCNewOrder also poplulates when I hover over it. But It does not recognize the NewOrder object (Edit) Once I add the second portion of the code it stops recognizing the object, but if I delete the bottom portion and only use the top 4 lines it works. Is it not possible to use variables in order to define the stop&target offset?


s_SCNewOrder NewOrder;
  NewOrder.OrderQuantity = 1;
  NewOrder.OrderType = SCT_LIMIT;
  NewOrder.TimeInForce = SCT_TIF_GTC;

  NewOrder.Target1Offset = ((CloseBullHigh-CloseBullLow)*RiskReward.GetInt())*sc.TickSize;
  NewOrder.Stop1Offset = (Last-CloseBullLow-StopBuffer.GetInt())*sc.TickSize;
  NewOrder.OCOGroup1Quantity = 1;
Date Time Of Last Edit: 2015-07-13 22:37:31
[2015-07-13 22:53:04]
enemyspy - Posts: 292 | Ending Date: 2020-06-14 [Expired]
Nevermind. I am a dummy. My compiler stopped underlining syntax errors in red for some reason there was actually a problem with the line above this section that I was overlooking. No issues with this.

To post a message in this thread, you need to login with your Sierra Chart account:

Login

Login Page - Create Account